Re: Highly inconsistent diff UI

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Highly inconsistent diff UI

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:59

Jonathan Nieder [off-list ref] writes:
quoted
And it does not match "git log origin...HEAD" which gives both sides
of the symmetric difference of the history.  To match it, you have
to say "git log --right-only origin...HEAD" or something.
I tend to use --left-right.  All I meant is that with both diff and
log, ... is a way to get something meaningful when my history and
someone else's history have diverged.

I agree that it would be easier to explain if there were some

	git diff --from-merge-base A B
Yeah, I am not strongly opposed to have something like that, and
having a shorter (but not a single letter) option name might make it
more attractive than A...B at least to new users.
We could say that "git diff A...B" is a mostly meaningless shorthand
for that.
You may remember but this is not the first time we discussed that
three-dot in log and diff mean different things.

Instead of saying "meaningless", I think in the past discussion the
explanation given was that three-dot means different things between
the context to specify a range (i.e. a symmetric difference) and the
context to specify two endpoints (i.e. base and right end).

Which by the way is nothing new.  "A" means the entire history
leading to the commit "A" in the context of specifying a range, and
the same "A" means a single commit "A" in the context of specifying
a revision.

Re: Highly inconsistent diff UI

From: Ramkumar Ramachandra <hidden>
Date: 2016-06-15 22:56:59

Junio C Hamano wrote:
Yeah, I am not strongly opposed to have something like that, and
having a shorter (but not a single letter) option name might make it
more attractive than A...B at least to new users.
I'm not married to the single character or tilde.  What I'm saying is
that we should make it a rev spec, not a command-line option.
Which by the way is nothing new.  "A" means the entire history
leading to the commit "A" in the context of specifying a range, and
the same "A" means a single commit "A" in the context of specifying
a revision.
Exactly.  And I'm introducing a third context: "when specifying two
trees to diff".  Changing meaning in different contexts is not a
problem, as long as it is consistent and properly documented.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help