From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: "René Scharfe" <l.s.r@web.de>,
"D. Ben Knoble" <ben.knoble@gmail.com>, Git <git@vger.kernel.org>,
"Phillip Wood" <phillip.wood@dunelm.org.uk>
Subject: Re: [PATCH v2] diff: disable rename detection with --quiet
Date: Mon, 10 Nov 2025 11:13:55 -0800 [thread overview]
Message-ID: <xmqqseelzong.fsf@gitster.g> (raw)
In-Reply-To: <20251110175408.GB76603@coredump.intra.peff.net> (Jeff King's message of "Mon, 10 Nov 2025 12:54:08 -0500")
Jeff King <peff@peff.net> writes:
> This makes sense to me, and I can't think of a reason why you would want
> rename detection on if we're not going to show the results (and likewise
> I can't think of a way that a rename result would affect has_changes).
>
> I wonder if we should _also_ take the hunk from v1 that teaches
> can_quit_early() to avoid triggering when copy detection is on. It's
> probably redundant now, but it feels to me like that's the place where
> the correctness check should kick in. And the patch here is just
> optimizing out the unnecessary work, but also happens to align things
> for correctness downstream.
Concurred on both counts.
> You don't say in the commit message when this bug started. I briefly
> wondered if it was caused by the recent diff_from_contents stuff we've
> been discussing. But it's the opposite here (the bug happens when we
> _don't_ set diff_from_contents). And I think it goes all the way back to
> b4194828dc (diff-index --quiet: learn the "stop feeding the backend
> early" logic, 2011-05-31).
Yup, I think so. Back then I think our assumptions are that the
user knows better than giving complex diffcore requests like
find-copies-harder only to discard the results with --quiet, and the
patch started this thread helps other users, which is good ;-).
next prev parent reply other threads:[~2025-11-10 19:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-08 19:05 diff --cached --no-ext-diff --find-copies-harder --quiet exits with wrong status code D. Ben Knoble
2025-11-08 19:08 ` D. Ben Knoble
2025-11-08 19:12 ` D. Ben Knoble
2025-11-09 12:11 ` [PATCH] diff: disabled quick optimization with --find-copies-harder René Scharfe
2025-11-09 14:18 ` Phillip Wood
2025-11-09 16:43 ` René Scharfe
2025-11-09 16:43 ` [PATCH v2] diff: disable rename detection with --quiet René Scharfe
2025-11-09 17:34 ` D. Ben Knoble
2025-11-09 18:35 ` René Scharfe
2025-11-10 23:58 ` D. Ben Knoble
2025-11-10 9:42 ` Phillip Wood
2025-11-10 17:54 ` Jeff King
2025-11-10 19:13 ` Junio C Hamano [this message]
2025-11-22 21:44 ` René Scharfe
2025-11-23 7:09 ` Junio C Hamano
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=xmqqseelzong.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=peff@peff.net \
--cc=phillip.wood@dunelm.org.uk \
/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).