From: Aviv Eyal Date: Wed, 11 Sep 2013 17:36:23 +0000 (-0700) Subject: parse ls-tree with git-submodule correctly X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=1fa8e861b276e4d05842772bb77a667abd4cb2f3;p=arcanist.git 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 --- 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) {