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

Re: Deprecating git diff ..; dealing with other ranges

From
Elijah Newren <newren@gmail.com>
Date
Mar 18, 2019, 17:07 UTC
Message-ID
<CABPp-BHMi=RTWAVjuORdTWY3ijp4EKhy2QAH0=WrviCiotJtyw@mail.gmail.com>
In-Reply-To
<87wol3bydp.fsf@evledraar.gmail.com>

On Tue, Mar 12, 2019 at 2:01 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 23 quoted lines
> On Tue, Mar 12 2019, Andreas Schwab wrote:
> > On Mär 12 2019, Junio C Hamano <gitster@pobox.com> wrote:
> >
> >> I however think it may be worth making sure that our docs do not
> >> encourage "diff A..B" and teach "diff A B" when comparing two
> >> endpoints.  That can be done without changing anything in the code.
> >
> > The nice thing about "diff A..B" is that you can c&p the output from the
> > fetch run without the need to edit it.
>
> Not to shoot down this effort, just to add another similar thing I do
> regularly for ff-branches:
>
>  1. Copy/paste A..B fetch output
>  2. git log A..B
>  3. ^log^diff
>
> I.e. I just need to tell my terminal to re-run the same "log" command
> with "diff" instead of "log".
>
> Of course as covered in the linked thread it doesn't work for some
> (non-ff) cases, and I'll sometimes end up cursing it and swapping around
> ".." for "..." with log/diff.

Doesn't this somewhat imply that although you use diff A..B here for convenience, that it's actually wrong since what you really want is A...B? Or said another way, the end goal of deprecating "diff "A..B" then later reinstating "diff A..B" to mean the same thing as "diff A...B" would actually be better even for your usecase?

Of course, switching to the removal period may just be too painful for too many folks since there are obviously people that use it, but I just want to see if I'm understanding correctly here.

Previous: Johannes SixtNext: Michal Suchánek
Message 8 of 14 in “Deprecating git diff ..; dealing with other ranges”
  1. Denton LiuMar 11, 2019
  2. Johannes SchindelinMar 11, 2019
  3. Elijah NewrenMar 11, 2019
  4. Junio C HamanoMar 12, 2019
  5. Andreas SchwabMar 12, 2019
  6. Ævar Arnfjörð BjarmasonMar 12, 2019
  7. Johannes SixtMar 13, 2019
  8. Elijah NewrenMar 18, 2019
  9. Michal SuchánekMar 18, 2019
  10. Elijah NewrenMar 18, 2019
  11. Ævar Arnfjörð BjarmasonMar 18, 2019
  12. Duy NguyenMar 13, 2019
  13. Andreas SchwabMar 13, 2019
  14. Junio C HamanoMar 12, 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.