From a80d1e7e7d2d859c11f0bdf752e6d0b1abfa6993 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 26 Jan 2018 13:35:09 -0800 Subject: [PATCH] Pass "." to `git grep` to satisfy "all paths" for Git 2.16.0 Summary: Ref T13050. See . `secure` picked up 2.16.0 so this reproduces now: Test Plan: Will push. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13050 Differential Revision: https://secure.phabricator.com/D18944 --- .../conduit/DiffusionSearchQueryConduitAPIMethod.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php index af973f102d..4290a7f6b5 100644 --- a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php +++ b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php @@ -95,6 +95,12 @@ final class DiffusionSearchQueryConduitAPIMethod $limit = $request->getValue('limit'); $offset = $request->getValue('offset'); + // Starting with Git 2.16.0, Git assumes passing an empty argument is + // an error and recommends you pass "." instead. + if (!strlen($path)) { + $path = '.'; + } + $results = array(); $future = $repository->getLocalCommandFuture( 'grep --rev %s --print0 --line-number -- %s %s',