diff --git a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php --- a/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php +++ b/src/applications/diffusion/conduit/DiffusionSearchQueryConduitAPIMethod.php @@ -54,6 +54,12 @@ $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( // NOTE: --perl-regexp is available only with libpcre compiled in. @@ -95,12 +101,6 @@ $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',