summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2018-06-04 20:17:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-11 17:22:32 (GMT)
commit6cb09125bea69d9bdb461b8ecacd5c50c9e6a4f5 (patch)
tree1a229b1f279026e050df4804d977d969cd19c38e /t
parent8462ff43e42ab67cecd16fdfb59451a53cc8a945 (diff)
downloadgit-6cb09125bea69d9bdb461b8ecacd5c50c9e6a4f5.zip
git-6cb09125bea69d9bdb461b8ecacd5c50c9e6a4f5.tar.gz
git-6cb09125bea69d9bdb461b8ecacd5c50c9e6a4f5.tar.bz2
config.c: fix regression for core.safecrlf false
A regression introduced in 8462ff43 ("convert_to_git(): safe_crlf/checksafe becomes int conv_flags", 2018-01-13) back in Git 2.17 cycle caused autocrlf rewrites to produce a warning message despite setting safecrlf=false. Signed-off-by: Anthony Sottile <asottile@umich.edu> Acked-By: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t0020-crlf.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t0020-crlf.sh b/t/t0020-crlf.sh
index 71350e0..5f05698 100755
--- a/t/t0020-crlf.sh
+++ b/t/t0020-crlf.sh
@@ -98,6 +98,16 @@ test_expect_success 'safecrlf: git diff demotes safecrlf=true to warn' '
'
+test_expect_success 'safecrlf: no warning with safecrlf=false' '
+ git config core.autocrlf input &&
+ git config core.safecrlf false &&
+
+ for w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&
+ git add allcrlf 2>err &&
+ test_must_be_empty err
+'
+
+
test_expect_success 'switch off autocrlf, safecrlf, reset HEAD' '
git config core.autocrlf false &&
git config core.safecrlf false &&