[BUG] git rev-list --no-walk A B C sorts by commit date incorrectly

From: Kevin Ballard <hidden>
Date: 2016-06-15 22:50:21

-----------------------------------------------------------------------------
Running the command `git rev-list --no-walk A B C` should be expected to emit
the commits in the same order as they were specified. This is especially
important as the same machinery is used for `git cherry-pick`, and so saying
`git cherry-pick A B C` can be expected to pick A before B, and B before C.

This does not happen.

Instead, it appears to be sorting the given commits according to the commit
timestamp. To make matters worse, it's not a stable sort. If commits A and
B have the same timestamp (for example, if they were rebased together), then
git cherry-pick tends to apply B before A.

Is there any rationale for this behavior? Any place where it makes sense to
reorder the commits in this fashion? As far as I'm concerned, typing
`git cherry-pick A B C` should behave identically to typing

  git cherry-pick A
  git cherry-pick B
  git cherry-pick C

regardless of the actual commit dates on A, B, and C.

-Kevin Ballard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help