1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-02 21:06:29 +02:00

Merge branch 'as/safecrlf-quiet-fix'

Fix for 2.17-era regression around `core.safecrlf`.

* as/safecrlf-quiet-fix:
  config.c: fix regression for core.safecrlf false
This commit is contained in:
Junio C Hamano 2018-06-28 12:53:29 -07:00
commit 8063ff9cf5
2 changed files with 11 additions and 1 deletions

View File

@ -1233,7 +1233,7 @@ static int git_default_core_config(const char *var, const char *value)
}
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;
}

View File

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