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
Martin von Zweigbergk <martinvonz@google.com>
Date
Oct 16, 2025, 17:12 UTC
Message-ID
<CAESOdVCQR=z95MK1oHZO4_iBXS8Z9uz4Fs0gDDX+BfaG9_3=ag@mail.gmail.com>
In-Reply-To
<d47e137b-c34d-49c9-bf45-226cbcdba416@app.fastmail.com>

On Thu, 16 Oct 2025 at 10:02, Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com> wrote:

Show 16 quoted lines
>
> On Thu, Oct 16, 2025, at 18:38, Martin von Zweigbergk wrote:
> > On Thu, 16 Oct 2025 at 06:44, Junio C Hamano <gitster@pobox.com> wrote:
> >>[snip]
> >>
> >> The same for "git checkout master..."  that detaches HEAD at the
> >> fork point of the current topic (so that I can "git am" in a new
> >> iteration of patches on top).
> >
> > I couldn't get this to work:
> >
> > $ git checkout main... --
> > fatal: invalid reference: main...
>
> `git checkout X...` works for me.  Apparently it is this part of the
> doc: “As a special case, you may use <rev-a>...<rev-b> [...]”

Oh, I think I know what the problem is. The reason I tried it was that I was curious how it would behave when there are multiple merge bases, so I had set up a repo like that. Then I got this:

``` $ git checkout main... error: pathspec 'main...' did not match any file(s) known to git $ git checkout main... -- fatal: invalid reference: main... ```

I didn't expect those messages to mean "the common ancestor is ambiguous" so I didn't think to try with an unambiguous common ancestor.

Show 9 quoted lines
>
> >
> > But don't worry about it. I think your point about there being other
> > commands that support the triple-dot syntax is still valid.
> >
> >>  As the syntax "git diff master..."
> >> is symmetric with it, if one were to change, both should change to
> >> the same.
> >[snip]
Previous: Kristoffer HaugsbakkNext: Junio C Hamano
Message 10 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.