Skip commit objects that should be trees, rather than copying them.

An improvement on the previous patch, based on more reports from Sum-Wai
Low.
This commit is contained in:
Avery Pennarun 2011-02-28 20:48:50 -08:00
parent 856bea1f71
commit 2793ee6ba6

View File

@ -398,6 +398,7 @@ subtree_for_commit()
while read mode type tree name; do
assert [ "$name" = "$dir" ]
assert [ "$type" = "tree" -o "$type" = "commit" ]
[ "$type" = "commit" ] && continue # ignore submodules
echo $tree
break
done