From: Pelle Wessman Date: Wed, 30 Sep 2009 12:29:42 +0000 (+0200) Subject: Check that the type of the tree really is a tree and not a commit as it seems to... X-Git-Tag: v1.7.11-rc0~176^2~35^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8ac5eca1eaa88bd5b998e91531937404bc6425c4;p=git.git 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. --- diff --git a/git-subtree.sh b/git-subtree.sh index b7c741cfd..454ce7ef2 100755 --- a/git-subtree.sh +++ b/git-subtree.sh @@ -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