summaryrefslogtreecommitdiff
path: root/t/t0020-crlf.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t0020-crlf.sh')
-rwxr-xr-xt/t0020-crlf.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 723b29ad17..600dcd30a0 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -214,4 +214,28 @@ test_expect_success 'apply patch --index (autocrlf=true)' '
}
'
+test_expect_success '.gitattributes says two is binary' '
+
+ echo "two !crlf" >.gitattributes &&
+ rm -f tmp one dir/two &&
+ git repo-config core.autocrlf true &&
+ git read-tree --reset -u HEAD &&
+
+ if remove_cr dir/two >/dev/null
+ then
+ echo "Huh?"
+ false
+ else
+ : happy
+ fi &&
+
+ if remove_cr one >/dev/null
+ then
+ : happy
+ else
+ echo "Huh?"
+ false
+ fi
+'
+
test_done