1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

Move the fix for Git 2.16.0 from the "Mercurial" part of the code to the "Git" part of the code

Summary: Ref T13050. Oh boy. Both of them run `grep`!

Test Plan: Will push again.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13050

Differential Revision: https://secure.phabricator.com/D18945
This commit is contained in:
epriestley 2018-01-26 13:42:27 -08:00
parent a80d1e7e7d
commit 162563d40b

View file

@ -54,6 +54,12 @@ final class DiffusionSearchQueryConduitAPIMethod
$limit = $request->getValue('limit'); $limit = $request->getValue('limit');
$offset = $request->getValue('offset'); $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(); $results = array();
$future = $repository->getLocalCommandFuture( $future = $repository->getLocalCommandFuture(
// NOTE: --perl-regexp is available only with libpcre compiled in. // NOTE: --perl-regexp is available only with libpcre compiled in.
@ -95,12 +101,6 @@ final class DiffusionSearchQueryConduitAPIMethod
$limit = $request->getValue('limit'); $limit = $request->getValue('limit');
$offset = $request->getValue('offset'); $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(); $results = array();
$future = $repository->getLocalCommandFuture( $future = $repository->getLocalCommandFuture(
'grep --rev %s --print0 --line-number -- %s %s', 'grep --rev %s --print0 --line-number -- %s %s',