From: Junio C Hamano <gitster@pobox.com>
To: "René Scharfe" <l.s.r@web.de>
Cc: Jan Wendland <jwend1703@gmail.com>, git@vger.kernel.org
Subject: Re: git diff --exit-code misbehaving in 2.46.x
Date: Wed, 25 Sep 2024 09:58:21 -0700 [thread overview]
Message-ID: <xmqqbk0bpt5e.fsf@gitster.g> (raw)
In-Reply-To: <e3da5c9b-c208-4937-a2b4-e1028f3e6841@web.de> ("René Scharfe"'s message of "Wed, 25 Sep 2024 17:26:59 +0200")
René Scharfe <l.s.r@web.de> writes:
> Am 25.09.24 um 16:27 schrieb Jan Wendland:
>>
>> git diff --exit-code in 2.46.x is unexpectedly returning a zero exit
>> code for files marked as binary in .gitattributes where 2.45.x would
>> correctly produce a non-zero exit code.
>> ...
> Thanks for the report! This is a known bug. The "next" branch contains
> a fix, 9a41735af6 (diff: report modified binary files as changes in
> builtin_diff(), 2024-09-21).
I just noticed something curious.
9a41735a (diff: report modified binary files as changes in
builtin_diff(), 2024-09-21) explains that since 1aaf69e6 (diff:
shortcut for diff'ing two binary SHA-1 objects, 2014-08-16) added
binary comparison, the code path always used a quick hash-only
comparison. But the above report claims it is a behaviour change
between 2.45 and 2.46.
It does seem to say things are different with 2.45 when binary
changes were checked with --quiet/--exit-code from my manual
testing, though.
Thanks.
next prev parent reply other threads:[~2024-09-25 16:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 14:27 git diff --exit-code misbehaving in 2.46.x Jan Wendland
2024-09-25 15:26 ` René Scharfe
2024-09-25 16:58 ` Junio C Hamano [this message]
2024-09-25 18:06 ` René Scharfe
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=xmqqbk0bpt5e.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jwend1703@gmail.com \
--cc=l.s.r@web.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 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).