1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-26 08:42:40 +01:00

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
This commit is contained in:
Aviv Eyal 2013-09-11 10:36:23 -07:00 committed by epriestley
parent 699f3b3c05
commit 1fa8e861b2

View 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) {