Re: [PATCH 3/3] range-diff(docs): explain how to specify commit ranges
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 22, 2021, 18:21 UTC
- Message-ID
- <xmqq1recal32.fsf@gitster.c.googlers.com>
- In-Reply-To
- <nycvar.QRO.7.76.6.2101221720200.52@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> > +- `<rev1>...<rev2>`. This resembles the symmetric ranges mentioned in >> > + the `SPECIFYING RANGES` section of linkgit:gitrevisions[7], and is >> > + equivalent to `<base>..<rev1> <base>..<rev2>` where `<base>` is the >> > + merge base as obtained via `git merge-base <rev1> <rev2>`.
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.
Show 5 quoted lines
>> 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?
The fact that range-diff internally translates A...B into something else is an implementation detail of achieving something, and from the end-users' point of view, isn't it "take A...B from the end-user, and show the difference between the left and right branches of the symmetric range" that range-diff achieves to do?
So it processes exactly the same two sets of commits as what is given by "--left-right A...B", no?