Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue. What did you do before the bug happened? (Steps to reproduce your issue) 9:43:55.45 2023-08-04 C:\src\t\scripts>TYPE .\t1.txt this is t1.txt 9:43:57.92 2023-08-04 C:\src\t\scripts>TYPE .\t2.txt this is t2.txt 9:43:58.04 2023-08-04 C:\src\t\scripts>"C:\Program Files\Git\cmd\git.exe" diff --exit-code --no-index --ignore-all-space --shortstat .\t1.txt .\t2.txt 1 file changed, 1 insertion(+), 1 deletion(-) 9:43:58.14 2023-08-04 C:\src\t\scripts>ECHO %ERRORLEVEL% 0 What did you expect to happen? (Expected behavior) I expected that the exit code from `git diff` would be 1, or something non-zero because the files are different. What happened instead? (Actual behavior) The exit code was zero (0). What's different between what you expected and what actually happened? Zero (0) is not one (1). :-) Anything else you want to add: Please review the rest of the bug report below. You can delete any lines you don't wish to share. [System Info] git version: git version 2.39.2.windows.1 cpu: x86_64 built from commit: a82fa99b36ddfd643e61ed45e52abe314687df67 sizeof-long: 4 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Windows 10.0 19044 compiler info: gnuc: 12.2 libc info: no libc information available $SHELL (typically, interactive shell): <unset> PowerShell 7.3.6 Console on Windows 10 [Enabled Hooks] This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or intended recipient’s authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately.