From: Junio C Hamano <gitster@pobox.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>
Cc: "René Scharfe" <l.s.r@web.de>, "Git List" <git@vger.kernel.org>
Subject: Re: [PATCH RESEND] diff-files: fix copy detection
Date: Tue, 16 Dec 2025 10:21:31 +0900 [thread overview]
Message-ID: <xmqqecov5ihw.fsf@gitster.g> (raw)
In-Reply-To: <aUCTdUMKslSo3XR9@szeder.dev> ("SZEDER Gábor"'s message of "Tue, 16 Dec 2025 00:02:13 +0100")
SZEDER Gábor <szeder.dev@gmail.com> writes:
> On Sun, Dec 14, 2025 at 04:57:06PM +0100, René Scharfe wrote:
>> Fix copy detection by queuing up-to-date and skip-worktree entries using
>> diff_same().
>
>> diff --git a/diff-lib.c b/diff-lib.c
>> index 8e624f38c6..5307390ff3 100644
>> --- a/diff-lib.c
>> +++ b/diff-lib.c
>
>> @@ -272,8 +276,10 @@ void run_diff_files(struct rev_info *revs, unsigned int option)
>> if (!changed && !dirty_submodule) {
>> ce_mark_uptodate(ce);
>> mark_fsmonitor_valid(istate, ce);
>> - if (!revs->diffopt.flags.find_copies_harder)
>> - continue;
>> + if (revs->diffopt.flags.find_copies_harder)
>> + diff_same(&revs->diffopt, newmode,
>> + &ce->oid, ce->name);
>
> Junio, this patch should be queued on top of 38f88051da
> (diff-index: don't queue unchanged filepairs with diff_change(),
> 2025-11-30), because diff_same() was introduced in that commit.
Very true. Thanks.
>
> ~/src/git ((7077c385f9...) %)$ git log --oneline -1
> 7077c385f9 (HEAD) diff-files: fix copy detection
> ~/src/git ((7077c385f9...) %)$ make diff-lib.o
> CC diff-lib.o
> diff-lib.c: In function ‘run_diff_files’:
> diff-lib.c:231:33: error: implicit declaration of function ‘diff_same’; did you mean ‘diff_free’? [-Werror=implicit-function-declaration]
> 231 | diff_same(&revs->diffopt, ce->ce_mode,
> | ^~~~~~~~~
> | diff_free
> cc1: all warnings being treated as errors
> make: *** [Makefile:2862: diff-lib.o] Error 1
prev parent reply other threads:[~2025-12-16 1:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-14 15:57 [PATCH RESEND] diff-files: fix copy detection René Scharfe
2025-12-15 23:02 ` SZEDER Gábor
2025-12-16 1:21 ` Junio C Hamano [this message]
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=xmqqecov5ihw.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=l.s.r@web.de \
--cc=szeder.dev@gmail.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).