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

Re: [PATCH] git-diff.txt: prefer not using <commit>..<commit>

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 19, 2019, 00:56 UTC
Message-ID
<xmqqy35by94j.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<87mulsdmsi.fsf@evledraar.gmail.com>
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
Show 8 quoted lines
> Some of this thread's confusing, and on re-reading I see my reply hasn't
> helped much.
>
> To clarify. There's at least these things to consider:
>
> 1. What should the semantics of .. or ... be?
> 2. What semantics (regardless of syntax) should we recommend for common cases?
> 3. Depending on #1 and #2, can we make our docs less confusing?
Nice way to summarise.
Show 9 quoted lines
> My opinion:
>
> 1. I'd ideally like to switch the semantics of ".." and "...". I don't
>    think anyone argues that it would be a bad thing in theory if we'd
>    started out that way, Whether it's worth switching now is another
>    matter.
>
>    Junio chimed in in <xmqqmum0h88n.fsf@gitster-ct.c.googlers.com>
>    saying he's not for it, so I'm assuming it's out for now.

I do agree with the "in the ideal world, where we didn't have any existing users and had perfect foresight back when invention of three-dot form for 'log' was even a few months away down the road, we would have used diff A...B for the two-endpoints", and I also agree with "that is 10 years or more too late now---don't waste time even pondering about it".

>
> 2. I agree that we should generally recommend what's now "..." instead
>    of "..", whatever the syntax is to invoke that.

I do not agree with this at all. When I want to compare what is in devel and what is in master, I may be interested in two completely different things depending on why I am doing the comparison.

 - I may want to know "what is in the development track that is yet
   to be merged to 'master'".
 - Or I may be looking for "what is the difference between the master
   branch and the development branch."

The latter should match the former if 'devel' and 'master' means what we generally think they are, and by looking at the latter, I can find what would be missed if I wholesale replace 'master' with 'devel' before merging 'master' backwards into 'devel' to make the latter catch up. So even in that context, I would prefer to see the latter (needless to say, the start-up cost is far less for the latter than for the former).

When we discuss a more generic "two endpoints comparison" whose relationship between the two endpoints is not as well-defined as 'devel' and 'master' (i.e. what does it mean to compare v1.2.1 and v1.3.4?), I can phrase in human-understandable terms what ".." does, but not what "..." does. I have no idea how you or anybody can say that "we should generally recommend" that the former is the norm and two-endpoint comparison is an exception.

Previous: Ævar Arnfjörð BjarmasonNext: Elijah Newren
Message 12 of 16 in “git-diff.txt: prefer not using <commit>..<commit>”
  1. git-diff.txt: prefer not using <commit>..<commit>Denton Liu, Mar 17, 2019
  2. Duy NguyenMar 17, 2019
  3. Junio C HamanoMar 18, 2019
  4. Denton LiuMar 19, 2019
  5. Johannes SchindelinMar 21, 2019
  6. Ævar Arnfjörð BjarmasonMar 17, 2019
  7. Duy NguyenMar 17, 2019
  8. Ævar Arnfjörð BjarmasonMar 17, 2019
  9. Junio C HamanoMar 18, 2019
  10. Elijah NewrenMar 18, 2019
  11. Ævar Arnfjörð BjarmasonMar 18, 2019
  12. Junio C HamanoMar 19, 2019
  13. Elijah NewrenMar 20, 2019
  14. Elijah NewrenMar 18, 2019
  15. Denton LiuMar 20, 2019
  16. Elijah NewrenMar 21, 2019

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.