]> khamidou — GitHub mirrors - arcanist.git/commitdiff
parse ls-tree with git-submodule correctly
authorAviv Eyal <avivey@gmail.com>
Wed, 11 Sep 2013 17:36:23 +0000 (10:36 -0700)
committerepriestley <git@epriestley.com>
Wed, 11 Sep 2013 17:36:23 +0000 (10:36 -0700)
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

index da5bdcb2615f1ecd5e9e7db05967a5e8a4f4b3a5..7b109f961cfce62cb5a74f9eb433b30114c46577 100644 (file)
@@ -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) {