Skip to content

Commit 2793ee6

Browse files
committed
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.
1 parent 856bea1 commit 2793ee6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git-subtree.sh

+1
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ subtree_for_commit()
398398
while read mode type tree name; do
399399
assert [ "$name" = "$dir" ]
400400
assert [ "$type" = "tree" -o "$type" = "commit" ]
401+
[ "$type" = "commit" ] && continue # ignore submodules
401402
echo $tree
402403
break
403404
done

0 commit comments

Comments
 (0)