From a5bbadbaba0259350ccc6f6a86786373e935aee5 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 6 Feb 2018 16:00:45 -0800 Subject: [PATCH] Fix another Git 2.16.0 CLI compatibility issue Summary: This command also needs a "." instead of an empty string now. (This powers the file browser typeahead in Diffusion.) Test Plan: Will test in production since there's still no easy 2.16 installer for macOS. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D19010 --- .../conduit/DiffusionQueryPathsConduitAPIMethod.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/applications/diffusion/conduit/DiffusionQueryPathsConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionQueryPathsConduitAPIMethod.php index be2f07f2c6..09c07ec28f 100644 --- a/src/applications/diffusion/conduit/DiffusionQueryPathsConduitAPIMethod.php +++ b/src/applications/diffusion/conduit/DiffusionQueryPathsConduitAPIMethod.php @@ -37,7 +37,11 @@ final class DiffusionQueryPathsConduitAPIMethod $commit = $request->getValue('commit'); $repository = $drequest->getRepository(); - // http://comments.gmane.org/gmane.comp.version-control.git/197735 + // Recent versions of Git don't work if you pass the empty string, and + // require "." to list everything. + if (!strlen($path)) { + $path = '.'; + } $future = $repository->getLocalCommandFuture( 'ls-tree --name-only -r -z %s -- %s',