summaryrefslogtreecommitdiffstats
path: root/t/t4017-diff-retval.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-06-26 22:16:33 +0200
committerJunio C Hamano <gitster@pobox.com>2008-06-26 22:26:25 +0200
commit18374e584ca7a820457c1d83ee99867c216e7b75 (patch)
tree4745a5ec231cc46b28fd4531e9b71a5476606fed /t/t4017-diff-retval.sh
parentGIT 1.5.6.1 (diff)
downloadgit-18374e584ca7a820457c1d83ee99867c216e7b75.tar.xz
git-18374e584ca7a820457c1d83ee99867c216e7b75.zip
diff --check: do not discard error status upon seeing a good line
"git diff --check" should return non-zero when there was any whitespace error but the code only paid attention to the error status of the last new line in the patch. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to '')
-rwxr-xr-xt/t4017-diff-retval.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh
index dc0b7126cc..0d0fb87f57 100755
--- a/t/t4017-diff-retval.sh
+++ b/t/t4017-diff-retval.sh
@@ -105,4 +105,12 @@ test_expect_success '--check with --no-pager returns 2 for dirty difference' '
'
+
+test_expect_success 'check should test not just the last line' '
+ echo "" >>a &&
+ git --no-pager diff --check
+ test $? = 2
+
+'
+
test_done