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
Justin Tobler <jltobler@gmail.com>
Date
Oct 16, 2025, 01:28 UTC
Message-ID
<i5lgq7cunzqn2k3puuudzb53efqz6cxev64l6ukwy2kf24dab3@ndymfd2ocit3>
In-Reply-To
<pull.1989.git.1760566054455.gitgitgadget@gmail.com>
On 25/10/15 10:07PM, Martin von Zweigbergk via GitGitGadget wrote:
Show 5 quoted lines
> 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. 

Personally, I would like to see both the double-dot and triple-dot notations removed from the diff commands because they are often confused with the revision range notations. In my opinion, the double-dot notation doesn't even have much value as it can be replaced with:

  A..B => A B
  A..  => A @
   ..B => @ B
These alternatives are just as concise. 
Show 5 quoted lines
> 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.

With the existing triple-dot notation, `git diff A...B` is equivalent to `git diff $(git merge-base A B) B`. I think this is what you are suggesting about that the double-dot notation should do. As mentioned earlier, I think both these notations are too easily confused with revision range notations so I think we should avoid using the dot syntax for such a shortcut altogether.

The triple-dot notation is a somewhat convienient shortcut though. If we wanted to remove it, we would maybe want to replace it some other functionally equivalent shortcut.

All this being said, I've sure there are folks in the wild using these notations in scripts and changing would cause disruption. Maybe the Git 3.0 release would indeed be a good time to remove them though.

-Justin
Previous: D. Ben KnobleNext: Martin von Zweigbergk
Message 13 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.