Check that the type of the tree really is a tree and not a commit as it seems to sometimes become when eg. a submodule has existed in the same position previously.

This commit is contained in:
Pelle Wessman 2009-09-30 14:29:42 +02:00
parent 227f781147
commit 8ac5eca1ea

View File

@ -322,6 +322,7 @@ subtree_for_commit()
git ls-tree "$commit" -- "$dir" |
while read mode type tree name; do
assert [ "$name" = "$dir" ]
assert [ "$type" = "tree" ]
echo $tree
break
done