Merge branch 'mh/abspath'
[gitweb.git] / sequencer.c
index 1ea5293f6ed5395b95fbf63fc41aa28c33db0fa8..f86f116a15326f514fbe0405a9301f4ee2416344 100644 (file)
@@ -546,7 +546,11 @@ static int do_pick_commit(struct commit *commit, struct replay_opts *opts)
 
 static void prepare_revs(struct replay_opts *opts)
 {
-       if (opts->action != REPLAY_REVERT)
+       /*
+        * picking (but not reverting) ranges (but not individual revisions)
+        * should be done in reverse
+        */
+       if (opts->action == REPLAY_PICK && !opts->revs->no_walk)
                opts->revs->reverse ^= 1;
 
        if (prepare_revision_walk(opts->revs))