git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git diff --exit-code misbehaving in 2.46.x
@ 2024-09-25 14:27 Jan Wendland
  2024-09-25 15:26 ` René Scharfe
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Wendland @ 2024-09-25 14:27 UTC (permalink / raw)
  To: git

Hey team,

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.

To reproduce:
mkdir -p git-exit-code/dist
cd git-exit-code
git init
echo "hi" > dist/main.js
echo "dist/** binary" > .gitattributes
git add --all
git commit -m "Initial commit"
echo "some change" >> dist/main.js
git diff --exit-code
echo $? # actual is 0, expected to be 1

Is this intended?

Kind regards
Jan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-09-25 18:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-09-25 18:06     ` René Scharfe

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