Thread (1 message) 1 message, 1 author, 2021-01-28

Re: [PATCH 3/3] range-diff(docs): explain how to specify commit ranges

From: Junio C Hamano <hidden>
Date: 2021-01-28 05:44:29

Johannes Schindelin [off-list ref] writes:
quoted
The above paragraph says A...B is turned into $(git merge-base A
B)..A and $(git merge-base A B)..B, but I wonder if we should be
rewriting it into A..B and B..A instead; that would make it
unnecessary to explain what should happen when there are more than
one merge bases.
You know what? I lied.
I knew.  So we need an update to the patch.
quoted
quoted
quoted
Does this merely resemble?  Isn't it exactly what a symmetric range is?
No, it is not exactly what a symmetric range is because `range-diff`
treats both arms of the symmetric range independently, as two distinct
non-symmetric ranges.
This however is an end-user documentation, isn't it?
Yes, and the end user is talking about _two_ commit ranges in the context
of `git range-diff`, and about _one_ commit range in the context of `git
log`.
You are forgetting that "log A...B" shows only one half of what a
symmetric range means, and hides which side each commit belongs to.

"git log --left-right A...B" shows what a symmetric range really is;
there are two sides, left and right, and "git range-diff A...B" is
a natural way to compare these two ranges.

I've been quite happy with the way how "git range-diff @{-1}..."
shows the comparison of two sides of the symmetric range, given by
"git log --oneline --left-right @{-1}..."

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