git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Martin von Zweigbergk via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org,
	 Martin von Zweigbergk <martinvonz@gmail.com>,
	Martin von Zweigbergk <martinvonz@google.com>
Subject: Re: [PATCH] BreakingChanges: say that `git diff X..Y` syntax will be removed in 3.0
Date: Wed, 15 Oct 2025 15:19:46 -0700	[thread overview]
Message-ID: <xmqq4irzu7st.fsf@gitster.g> (raw)
In-Reply-To: <pull.1989.git.1760566054455.gitgitgadget@gmail.com> (Martin von Zweigbergk via GitGitGadget's message of "Wed, 15 Oct 2025 22:07:34 +0000")

"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.

In any case, a declaration that does not come with code changes that
are protected by WITH_BREAKING_CHANGES CPP macro is a patch that is
not quite ready to be applied.



> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1989%2Fmartinvonz%2Fmz%2Fwtmnpolouvvz-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1989/martinvonz/mz/wtmnpolouvvz-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/1989
>
>  Documentation/BreakingChanges.adoc | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/BreakingChanges.adoc b/Documentation/BreakingChanges.adoc
> index 90b53abcea..93fb968840 100644
> --- a/Documentation/BreakingChanges.adoc
> +++ b/Documentation/BreakingChanges.adoc
> @@ -114,6 +114,10 @@ applications and forges.
>  +
>  There is no plan to deprecate the "sha1" object format at this point in time.
>  +
> +Support for "git diff X..Y" syntax will be removed. Use "git diff X Y" instead.
> +This will open up the syntax for a more consistent interpretation of
> +"git diff $(git merge-base X Y) Y".
> ++
>  Cf. <2f5de416-04ba-c23d-1e0b-83bb655829a7@zombino.com>,
>  <20170223155046.e7nxivfwqqoprsqj@LykOS.localdomain>,
>  <CA+EOSBncr=4a4d8n9xS4FNehyebpmX8JiUwCsXD47EQDE+DiUQ@mail.gmail.com>.
>
> base-commit: 143f58ef7535f8f8a80d810768a18bdf3807de26

  reply	other threads:[~2025-10-15 22:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-15 22:07 [PATCH] BreakingChanges: say that `git diff X..Y` syntax will be removed in 3.0 Martin von Zweigbergk via GitGitGadget
2025-10-15 22:19 ` Junio C Hamano [this message]
2025-10-15 23:06   ` Martin von Zweigbergk
2025-10-16 17:42     ` Kristoffer Haugsbakk
2025-10-16 20:32     ` D. Ben Knoble
2025-10-15 22:28 ` brian m. carlson
2025-10-16 13:44   ` Junio C Hamano
2025-10-16 16:38     ` Martin von Zweigbergk
2025-10-16 17:02       ` Kristoffer Haugsbakk
2025-10-16 17:12         ` Martin von Zweigbergk
2025-10-16 16:56     ` Junio C Hamano
2025-10-16 20:42     ` D. Ben Knoble
2025-10-16  1:28 ` Justin Tobler
2025-10-16 16:34   ` Martin von Zweigbergk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq4irzu7st.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=martinvonz@gmail.com \
    --cc=martinvonz@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).