From 2793ee6ba6da57d97e9c313741041f7eb2e88974 Mon Sep 17 00:00:00 2001 From: Avery Pennarun Date: Mon, 28 Feb 2011 20:48:50 -0800 Subject: [PATCH] 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. --- git-subtree.sh | 1 + 1 file changed, 1 insertion(+) 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 -- 2.26.2