]> Kevux Git Server - rit/commitdiff
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 b7c741c..454ce7e 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