@matheusbsbs / matheus-bagliano / commits / 6f4f84fa2a
Fork 0

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.

Jesse Greenwald committed Nov 9, 2010 at 08:34 UTC 6f4f84fa2a03f441826f323c291ca6566acd0d3a
1 file changed +1 -1
git-subtree.sh
+1 -1
@@ -547,7 +547,7 @@ cmd_split()
547 # We can't restrict rev-list to only $dir here, because some of our
548 # parents have the $dir contents the root, and those won't match.
549 # (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'
551 revmax=$(eval "$grl" | wc -l)
552 revcount=0
553 createcount=0