Re: Highly inconsistent diff UI
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Apr 24, 2013, 16:40 UTC
- Message-ID
- <20130424164003.GB4119@elie.Belkin>
- In-Reply-To
- <CALkWK0n2ZZTgYxi3Fk2UxY8TXFAt1Xt3+11G98GKxbYdoMOT+Q@mail.gmail.com>
Hi,
Ramkumar Ramachandra wrote:
> A..B and A...B do not correspond to the meaning > specified in gitrevisions.txt. There's a note in the documentation > saying this, but I'm very unhappy.
What would it mean for A..B to be treated as a revision range?
Suppose I do a revision walk and come up with the commits x, y, and z. What is the resulting diff?
The common syntax is just a mnemonic: in the same situations as I might use "git log A...B", it can be handy to use "git diff A...B".
[...]
> What about other things like 'git diff ^A ^B' and 'git diff A^!'? Why > is diff so inconsistent with everything else?
"git diff ^A ^B" is invalid syntax. It's a bug that it doesn't complain.
"git diff A^!" is a very convenient shorthand for "git diff A^ A".
"diff" is fundamentally about comparing two endpoints. It is not a command for listing commits.
Hoping that clarifies, Jonathan