@matheusbsbs / matheus-bagliano / commits / 2793ee6ba6
Fork 0

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.

Avery Pennarun committed Feb 28, 2011 at 20:48 UTC 2793ee6ba6da57d97e9c313741041f7eb2e88974
1 file changed +1
git-subtree.sh
+1
@@ -398,6 +398,7 @@ subtree_for_commit()
398 while read mode type tree name; do
399 assert [ "$name" = "$dir" ]
400 assert [ "$type" = "tree" -o "$type" = "commit" ]
401 + [ "$type" = "commit" ] && continue # ignore submodules
402 echo $tree
403 break
404 done