range-diff: improve the order of the shown commits
commit9dc46e0268028059aecd140254bfe30277d04767
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Mon, 13 Aug 2018 11:33:05 +0000 (13 04:33 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Aug 2018 17:44:50 +0000 (13 10:44 -0700)
tree7c3e257d67db55bba30693bd6ee0d56c5bb1faba
parentd9c66f0b5bfdf3fc2898b7baad1bb9a72bfd7bf7
range-diff: improve the order of the shown commits

This patch lets `git range-diff` use the same order as tbdiff.

The idea is simple: for left-to-right readers, it is natural to assume
that the `git range-diff` is performed between an older vs a newer
version of the branch. As such, the user is probably more interested in
the question "where did this come from?" rather than "where did that one
go?".

To that end, we list the commits in the order of the second commit range
("the newer version"), inserting the unmatched commits of the first
commit range as soon as all their predecessors have been shown.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
range-diff.c