From 1fa8e861b276e4d05842772bb77a667abd4cb2f3 Mon Sep 17 00:00:00 2001 From: Aviv Eyal Date: Wed, 11 Sep 2013 10:36:23 -0700 Subject: [PATCH] parse ls-tree with git-submodule correctly Summary: git ls-tree gives type 'commit' for submodules. This code-path is only used when a binary file is present in the diff. Test Plan: arc diff with a binary file Reviewers: epriestley Reviewed By: epriestley CC: Korvin, aran Differential Revision: https://secure.phabricator.com/D6943 --- src/repository/api/ArcanistGitAPI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repository/api/ArcanistGitAPI.php b/src/repository/api/ArcanistGitAPI.php index da5bdcb2..7b109f96 100644 --- a/src/repository/api/ArcanistGitAPI.php +++ b/src/repository/api/ArcanistGitAPI.php @@ -697,7 +697,7 @@ final class ArcanistGitAPI extends ArcanistRepositoryAPI { foreach ($lines as $line) { $matches = array(); $ok = preg_match( - '/^(\d{6}) (blob|tree) ([a-z0-9]{40})[\t](.*)$/', + '/^(\d{6}) (blob|tree|commit) ([a-z0-9]{40})[\t](.*)$/', $line, $matches); if (!$ok) { -- 2.43.0