Skip to content
Permalink
Browse files

Merge pull request #1767 from gitster/as/safecrlf-quiet-fix

config.c: fix regression for core.safecrlf false
  • Loading branch information...
dscho committed Jul 30, 2018
2 parents 69eaca2 + 6cb0912 commit 07e862c150940f305140f052a205eb75cefa9a4b
Showing with 11 additions and 1 deletion.
  1. +1 −1 config.c
  2. +10 −0 t/t0020-crlf.sh
@@ -1233,7 +1233,7 @@ static int git_default_core_config(const char *var, const char *value, void *cb)
}
eol_rndtrp_die = git_config_bool(var, value);
global_conv_flags_eol = eol_rndtrp_die ?
CONV_EOL_RNDTRP_DIE : CONV_EOL_RNDTRP_WARN;
CONV_EOL_RNDTRP_DIE : 0;
return 0;
}

@@ -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 &&

0 comments on commit 07e862c

Please sign in to comment.
You can’t perform that action at this time.