git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: What's cooking in git.git (Oct 2020, #01; Mon, 5)

From
Denton Liu <liu.denton@gmail.com>
Date
Oct 7, 2020, 08:07 UTC
Message-ID
<20201007080735.GA2463829@generichostname>
In-Reply-To
<xmqq8scj5d3n.fsf@gitster.c.googlers.com>
Hi Junio,
On Tue, Oct 06, 2020 at 01:11:24PM -0700, Junio C Hamano wrote:
Show 17 quoted lines
> * dl/diff-merge-base (2020-09-21) 10 commits
>  - contrib/completion: complete `git diff --merge-base`
>  - builtin/diff-tree: learn --merge-base
>  - builtin/diff-index: learn --merge-base
>  - t4068: add --merge-base tests
>  - diff-lib: define diff_get_merge_base()
>  - diff-lib: accept option flags in run_diff_index()
>  - contrib/completion: extract common diff/difftool options
>  - git-diff.txt: backtick quote command text
>  - git-diff-index.txt: make --cached description a proper sentence
>  - t4068: remove unnecessary >tmp
> 
>  "git diff A...B" learned "git diff --merge-base A B", which is a
>  longer short-hand to say the same thing.
> 
>  Expecting a reroll.
>  cf. <xmqqblhyepup.fsf@gitster.c.googlers.com>

I'd prefer to not reroll this and leave it over-restrictive than under-restrictive if possible[0].

Looking back, I don't think I've explained this clearly enough. I believe that you are looking at this from the perspective of a Git developer where you know that diff is just a frontend for diff-index and diff-tree. However, I believe the perspective of a user who doesn't know/care about the implementation details, all they know about is the documentation.

In the documentation for diff, the `git diff <A> <B>` and the `git diff <A>..<B>` forms are documented in separate sections. Looking at it from that perspective, it would make sense that `--merge-base` only applies to the endpoint form and I don't think that users would detect any inconsistencies there.

Thanks, Denton

[0]: https://lore.kernel.org/git/20200926015256.GA136085@generichostname/
Previous: Junio C Hamano
Message 2 of 2 in “What's cooking in git.git (Oct 2020, #01; Mon, 5)”
  1. Junio C HamanoOct 6, 2020
  2. Denton LiuOct 7, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.