All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thomas Braun <thomas.braun@virtuell-zuhause.de>
Cc: "René Scharfe" <l.s.r@web.de>,
	"Kohei Shibata" <shiba200712@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] diff: report modified binary files as changes in builtin_diff()
Date: Wed, 25 Sep 2024 14:52:11 -0700	[thread overview]
Message-ID: <xmqq7cazo0z8.fsf@gitster.g> (raw)
In-Reply-To: <3192d8f4-4c7f-4b32-b564-7e075132c41c@virtuell-zuhause.de> (Thomas Braun's message of "Wed, 25 Sep 2024 23:24:18 +0200")

Thomas Braun <thomas.braun@virtuell-zuhause.de> writes:

> Am 21.09.2024 um 17:09 schrieb René Scharfe:
>
> Hi René,
>
>> diff --git a/diff.c b/diff.c
>> index 3be927b073..84a6bb0868 100644
>> --- a/diff.c
>> +++ b/diff.c
>> @@ -3675,6 +3675,7 @@ static void builtin_diff(const char *name_a,
>>   			emit_diff_symbol(o, DIFF_SYMBOL_BINARY_FILES,
>>   					 sb.buf, sb.len, 0);
>>   			strbuf_release(&sb);
>> +			o->found_changes = 1;
>>   			goto free_ab_and_return;
>>   		}
>>   		if (fill_mmfile(o->repo, &mf1, one) < 0 ||
>
> I poked at the same issue in parallel and had the same fix, but ...
>
>> ...
>>   	test_expect_success "git diff $option returns 1 for copied file" "
>>   		git reset --hard &&
>>   		cp a copy &&
>
> your test is nicer.
>
> The patch works here locally.
>
> For what it's worth:
>
> Reviewed-by: Thomas Braun <thomas.braun@virtuell-zuhause.de>
>
> Thomas

Thanks.

      reply	other threads:[~2024-09-25 21:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-21  4:26 git diff --exit-code returns 0 when binary files differ Kohei Shibata
2024-09-21 15:09 ` [PATCH] diff: report modified binary files as changes in builtin_diff() René Scharfe
2024-09-25 21:24   ` Thomas Braun
2024-09-25 21:52     ` 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=xmqq7cazo0z8.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=l.s.r@web.de \
    --cc=shiba200712@gmail.com \
    --cc=thomas.braun@virtuell-zuhause.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.