Permalink
Browse files

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.
  • Loading branch information...
1 parent 856bea1 commit 2793ee6ba6da57d97e9c313741041f7eb2e88974 @apenwarr apenwarr committed Mar 1, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 git-subtree.sh
View
@@ -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

0 comments on commit 2793ee6

Please sign in to comment.