Skip to content

Commit 8063ff9

Browse files
committed
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
2 parents a909726 + 6cb0912 commit 8063ff9

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1233,7 +1233,7 @@ static int git_default_core_config(const char *var, const char *value)
12331233
}
12341234
eol_rndtrp_die = git_config_bool(var, value);
12351235
global_conv_flags_eol = eol_rndtrp_die ?
1236-
CONV_EOL_RNDTRP_DIE : CONV_EOL_RNDTRP_WARN;
1236+
CONV_EOL_RNDTRP_DIE : 0;
12371237
return 0;
12381238
}
12391239

t/t0020-crlf.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ test_expect_success 'safecrlf: git diff demotes safecrlf=true to warn' '
9898
'
9999

100100

101+
test_expect_success 'safecrlf: no warning with safecrlf=false' '
102+
git config core.autocrlf input &&
103+
git config core.safecrlf false &&
104+
105+
for w in I am all CRLF; do echo $w; done | append_cr >allcrlf &&
106+
git add allcrlf 2>err &&
107+
test_must_be_empty err
108+
'
109+
110+
101111
test_expect_success 'switch off autocrlf, safecrlf, reset HEAD' '
102112
git config core.autocrlf false &&
103113
git config core.safecrlf false &&

0 commit comments

Comments
 (0)