mirror of
https://github.com/git/git.git
synced 2024-11-01 23:07:55 +01:00
It's also okay if an expected tree object is actually a commit.
...that happens with submodules sometimes, so don't panic. Reported by Sum-Wai Low.
This commit is contained in:
parent
915b9894ab
commit
856bea1f71
1 changed files with 1 additions and 1 deletions
|
@ -397,7 +397,7 @@ subtree_for_commit()
|
||||||
git ls-tree "$commit" -- "$dir" |
|
git ls-tree "$commit" -- "$dir" |
|
||||||
while read mode type tree name; do
|
while read mode type tree name; do
|
||||||
assert [ "$name" = "$dir" ]
|
assert [ "$name" = "$dir" ]
|
||||||
assert [ "$type" = "tree" ]
|
assert [ "$type" = "tree" -o "$type" = "commit" ]
|
||||||
echo $tree
|
echo $tree
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue