]> Kevux Git Server - rit/commitdiff
Split cmd now processes commits in topo order.
authorJesse Greenwald <jesse.greenwald@gmail.com>
Tue, 9 Nov 2010 14:34:49 +0000 (08:34 -0600)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 10 Nov 2010 05:20:32 +0000 (21:20 -0800)
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.

git-subtree.sh

index ce94d36..390c0fc 100755 (executable)
@@ -547,7 +547,7 @@ cmd_split()
        # We can't restrict rev-list to only $dir here, because some of our
        # parents have the $dir contents the root, and those won't match.
        # (and rev-list --follow doesn't seem to solve this)
-       grl='git rev-list --reverse --parents $revs $unrevs'
+       grl='git rev-list --topo-order --reverse --parents $revs $unrevs'
        revmax=$(eval "$grl" | wc -l)
        revcount=0
        createcount=0