diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php index c7149bd1..0643ab9d 100644 --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -1032,6 +1032,11 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI { // and treat it as though it as a file containing a list of other files, // which is silly. + if (!strlen($path)) { + // No filename, so there's no content (Probably new/deleted file). + return null; + } + list($stdout) = $this->execxLocal( 'ls-tree %s -- %s', $revision,