Skip to content

Commit 6f4f84f

Browse files
jessegreenwaldapenwarr
authored andcommitted
Split cmd now processes commits in topo order.
Added the "--topo-order" option to git rev-list. Without this, it seems that the revision list is coming back in reverse order but it is sorted chronologically. This does not gurantee that parent commits are handled before child commits.
1 parent 9a40fcc commit 6f4f84f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-subtree.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ cmd_split()
547547
# We can't restrict rev-list to only $dir here, because some of our
548548
# parents have the $dir contents the root, and those won't match.
549549
# (and rev-list --follow doesn't seem to solve this)
550-
grl='git rev-list --reverse --parents $revs $unrevs'
550+
grl='git rev-list --topo-order --reverse --parents $revs $unrevs'
551551
revmax=$(eval "$grl" | wc -l)
552552
revcount=0
553553
createcount=0

0 commit comments

Comments
 (0)