@matheusbsbs / matheus-bagliano / commits / 8ac5eca1ea
Fork 0

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.

Pelle Wessman committed Sep 30, 2009 at 14:29 UTC 8ac5eca1eaa88bd5b998e91531937404bc6425c4
1 file changed +1
git-subtree.sh
+1
@@ -322,6 +322,7 @@ subtree_for_commit()
322 git ls-tree "$commit" -- "$dir" |
323 while read mode type tree name; do
324 assert [ "$name" = "$dir" ]
325 + assert [ "$type" = "tree" ]
326 echo $tree
327 break
328 done