From e18872b2f0fba4cb860c9350bb8b8d8680dfc83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 1 May 2012 19:10:14 +0200 Subject: diff --stat: report mode-only changes for binary files like text files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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š Signed-off-by: Zbigniew Jędrzejewski-Szmek Signed-off-by: Junio C Hamano --- t/t4006-diff-mode.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 't/t4006-diff-mode.sh') diff --git a/t/t4006-diff-mode.sh b/t/t4006-diff-mode.sh index 392dfeff57..693bfc4a52 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 ' -- cgit v1.2.1