1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-11-19 15:34:51 +01:00

Merge branch 'master' of git://github.com/voxpelli/git-subtree

* 'master' of git://github.com/voxpelli/git-subtree:
  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:
Avery Pennarun 2009-10-02 14:53:35 -04:00
commit 39ee6ecf7e

View file

@ -322,6 +322,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" ]
echo $tree echo $tree
break break
done done