1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-19 16:58:48 +02:00

Pass "." to git grep to satisfy "all paths" for Git 2.16.0

Summary:
Ref T13050. See <https://discourse.phabricator-community.org/t/issues-with-git-2-16-0/1004/2>.

`secure` picked up 2.16.0 so this reproduces now: <https://secure.phabricator.com/source/phabricator/browse/master/?grep=dog>

Test Plan: Will push.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13050

Differential Revision: https://secure.phabricator.com/D18944
This commit is contained in:
epriestley 2018-01-26 13:35:09 -08:00
parent 4b5a78e343
commit a80d1e7e7d

View file

@ -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',