summaryrefslogtreecommitdiff
path: root/t/t4006-diff-mode.sh
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-05-01 17:10:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-05-02 04:26:46 (GMT)
commite18872b2f0fba4cb860c9350bb8b8d8680dfc83b (patch)
treeb9cc40964d8f6c95d648a074013af8aba6e73ecc /t/t4006-diff-mode.sh
parent4434e6ba6c2de994bd28892abe9fb3bdf1641560 (diff)
downloadgit-e18872b2f0fba4cb860c9350bb8b8d8680dfc83b.zip
git-e18872b2f0fba4cb860c9350bb8b8d8680dfc83b.tar.gz
git-e18872b2f0fba4cb860c9350bb8b8d8680dfc83b.tar.bz2
diff --stat: report mode-only changes for binary files like text files
Mode-only changes to binary files without content change were reported as if they were rewritten, but text files in the same situation were reported as "unchanged". Let's treat binary files like text files here, and simply say that they are unchanged. Output of --shortstat is modified in the same way. Reported-by: Martin Mareš <mj@ucw.cz> Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4006-diff-mode.sh')
-rwxr-xr-xt/t4006-diff-mode.sh8
1 files changed, 1 insertions, 7 deletions
diff --git a/t/t4006-diff-mode.sh b/t/t4006-diff-mode.sh
index 392dfef..693bfc4 100755
--- a/t/t4006-diff-mode.sh
+++ b/t/t4006-diff-mode.sh
@@ -46,18 +46,12 @@ test_expect_success '--shortstat output after text chmod' '
test_expect_success '--stat output after binary chmod' '
test_chmod +x binbin &&
- cat >expect <<-EOF &&
- binbin | Bin 1024 -> 1024 bytes
- 1 file changed, 0 insertions(+), 0 deletions(-)
- EOF
+ echo " 0 files changed" >expect &&
git diff HEAD --stat >actual &&
test_cmp expect actual
'
test_expect_success '--shortstat output after binary chmod' '
- cat >expect <<-EOF &&
- 1 file changed, 0 insertions(+), 0 deletions(-)
- EOF
git diff HEAD --shortstat >actual &&
test_cmp expect actual
'