From 8ac5eca1eaa88bd5b998e91531937404bc6425c4 Mon Sep 17 00:00:00 2001 From: Pelle Wessman Date: Wed, 30 Sep 2009 14:29:42 +0200 Subject: [PATCH] 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. --- git-subtree.sh | 1 + 1 file changed, 1 insertion(+) 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 -- 2.26.2