Check that the type of the tree really is a tree and not a commit as it seems to...
authorPelle Wessman <pelle@kodfabrik.se>
Wed, 30 Sep 2009 12:29:42 +0000 (14:29 +0200)
committerPelle Wessman <pelle@kodfabrik.se>
Wed, 30 Sep 2009 12:29:42 +0000 (14:29 +0200)
git-subtree.sh

index b7c741cfd43ef7501502f7be64174b0fd8385c7c..454ce7ef2228fcd2698a0f3a21b0ffb48fa26951 100755 (executable)
@@ -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