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

Re: [PATCH] BreakingChanges: say that `git diff X..Y` syntax will be removed in 3.0

From
D. Ben Knoble <ben.knoble@gmail.com>
Date
Oct 16, 2025, 20:32 UTC
Message-ID
<CALnO6CBaTUzFFB+h5aXN2GuNwm2oyk5ZNEy8u9=80zwQjdfsOQ@mail.gmail.com>
In-Reply-To
<CAESOdVAHt8nUQRE64RXwS4FiO1=Qy8EPamDwaPqUrHvx7bKCEQ@mail.gmail.com>

On Wed, Oct 15, 2025 at 7:07 PM Martin von Zweigbergk <martinvonz@google.com> wrote:

Show 33 quoted lines
>
> On Wed, 15 Oct 2025 at 15:19, Junio C Hamano <gitster@pobox.com> wrote:
> >
> > "Martin von Zweigbergk via GitGitGadget" <gitgitgadget@gmail.com>
> > writes:
> >
> > > From: Martin von Zweigbergk <martinvonz@google.com>
> > >
> > > The `git diff X..Y` syntax is quite misleading because it looks like
> > > it shows the diff of the commits in the X..Y range but it actually
> > > shows the diff from X to Y. IMO, if that syntax is supported, it
> > > should show a diff from the merge base of X and Y to Y. I hope Git 3.0
> > > is a good time to remove support for the current syntax and
> > > semantics. Then we can perhaps add the syntax back later with less
> > > surprising semantics.
> > >
> > > Signed-off-by: Martin von Zweigbergk <martinvonz@google.com>
> > > ---
> > >     BreakingChanges: say that git diff X..Y syntax will be removed in 3.0
> >
> > I like it in prinicple and I do wish that we didn't do the lazy
> > thing when we did the command line parser for "git diff" (we had
> > revision range parser, so we just reused it instead of doing our own
> > for "git diff").  But real life may bite us back.
>
> Ah, so that's where it came from. Thanks for explaining. Speaking of
> revision range parsers, teaching Git something like Mercurial's or
> jj's "revsets" languages is one reason I would like to get rid of the
> `git diff X..Y` syntax here. I haven't done a comprehensive analysis
> but this is the only place I've noticed where we would need a breaking
> change if we ever wanted to teach Git revsets. (I'm not volunteering
> my time to work on such a project. I just think it would be nice if
> someone did :) )

Buried in my todo list is a goal to teach Git about JJ's "::" syntax :) Fortunately, I don't think that requires this particular change (which I'm otherwise in favor of).

-- 
D. Ben Knoble
Previous: Kristoffer HaugsbakkNext: brian m. carlson
Message 5 of 14 in “BreakingChanges: say that `git diff X..Y` syntax will be removed in 3.0”
  1. BreakingChanges: say that `git diff X..Y` syntax will be removed in 3.0Martin von Zweigbergk via GitGitGadget, Oct 15, 2025
  2. Junio C HamanoOct 15, 2025
  3. Martin von ZweigbergkOct 15, 2025
  4. Kristoffer HaugsbakkOct 16, 2025
  5. D. Ben KnobleOct 16, 2025
  6. brian m. carlsonOct 15, 2025
  7. Junio C HamanoOct 16, 2025
  8. Martin von ZweigbergkOct 16, 2025
  9. Kristoffer HaugsbakkOct 16, 2025
  10. Martin von ZweigbergkOct 16, 2025
  11. Junio C HamanoOct 16, 2025
  12. D. Ben KnobleOct 16, 2025
  13. Justin ToblerOct 16, 2025
  14. Martin von ZweigbergkOct 16, 2025

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.