summaryrefslogtreecommitdiff
path: root/t/t4020-diff-external.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2007-07-07 19:25:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-07 19:25:11 (GMT)
commit2c3fa66f3577d1305fb0fac5a181261fb2597859 (patch)
tree78b112202bbe518d5e9f2e8973674244a02fa593 /t/t4020-diff-external.sh
parente0e324a4dc18a4341e1320a7cfac9733d81f8b0b (diff)
downloadgit-2c3fa66f3577d1305fb0fac5a181261fb2597859.zip
git-2c3fa66f3577d1305fb0fac5a181261fb2597859.tar.gz
git-2c3fa66f3577d1305fb0fac5a181261fb2597859.tar.bz2
diff: honor binariness specified in attributes
The code shuffling mistakenly lost binariness specified with the attribute mecahnism and made it always guess from the data. Noticed by Johannes, with two test cases to t4020. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4020-diff-external.sh')
-rwxr-xr-xt/t4020-diff-external.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh
index f0045cd..ed3bd5b 100755
--- a/t/t4020-diff-external.sh
+++ b/t/t4020-diff-external.sh
@@ -94,4 +94,16 @@ test_expect_success 'diff attribute should apply only to diff' '
'
+test_expect_success 'no diff with -diff' '
+ echo >.gitattributes "file -diff" &&
+ git diff | grep Binary
+'
+
+echo NULZbetweenZwords | tr Z '\0' > file
+
+test_expect_success 'force diff with "diff"' '
+ echo >.gitattributes "file diff" &&
+ git diff | grep -a second
+'
+
test_done