Re: [BUG] Highly inconsistent diff UI
- From
Ramkumar Ramachandra <artagnon@gmail.com>
- Date
- Apr 24, 2013, 16:51 UTC
- Message-ID
- <CALkWK0mVDT5ESnVJAWQ83gQnmxmGDoM_Y0nE4FGybcjcenA_KA@mail.gmail.com>
- In-Reply-To
- <7va9ong9oa.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
Show 12 quoted lines
> The first thing to do is to eradicate "diff A..B" from the > documentation, and a dozen or more lines in your complaint will go > away with that single change. > > As you know, diff is about two endpoints, and A..B is not a way to > specify two endpoints, and not erroring it out whenever we see a > negative revision is a mere courtesy to old timers who knew the > command line parser was shared with rev-list machinery. > > There is no reason to forbid the syntax, but encouraging its use is > counterproductive and will lead to confusions to new people as you > pointed out.
Excellent. I agree wholeheartedly with this reasoning.
Show 5 quoted lines
> The only issue is to come up with a concise alternative way to > express "diff A...B", perhaps "diff --compare-with-base A B", and > then you can choose not to say anything but an object name (and no > range notation) on the command line (if you do not "diff A...B", it > can already be done by not using "diff A..B").
What are your thoughts on inventing a new syntax A~B = $(git merge-base A B) B which can be used by both range commands like log and non-range commands like diff ? (In other words, why shouldn't log be able to do this?). Does it matter which merge base we pick though?