From: Avery Pennarun Date: Tue, 1 Mar 2011 04:48:50 +0000 (-0800) Subject: Skip commit objects that should be trees, rather than copying them. X-Git-Tag: v1.7.11-rc0~176^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2793ee6ba6da57d97e9c313741041f7eb2e88974;p=git.git Skip commit objects that should be trees, rather than copying them. An improvement on the previous patch, based on more reports from Sum-Wai Low. --- diff --git a/git-subtree.sh b/git-subtree.sh index fa4e3e366..920c664bb 100755 --- a/git-subtree.sh +++ b/git-subtree.sh @@ -398,6 +398,7 @@ subtree_for_commit() while read mode type tree name; do assert [ "$name" = "$dir" ] assert [ "$type" = "tree" -o "$type" = "commit" ] + [ "$type" = "commit" ] && continue # ignore submodules echo $tree break done