summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-02-13 13:39:08 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-02-13 13:39:08 -0800
commit9bc89b17e36db31a54bc3ff16e48b5cb6beb095b (patch)
tree160acf5d402bc4a638fbaa5ad7d16dc228e08f88 /config.c
parentMerge branch 'rs/describe-unique-abbrev' (diff)
parentconvert_to_git(): safe_crlf/checksafe becomes int conv_flags (diff)
downloadtgif-9bc89b17e36db31a54bc3ff16e48b5cb6beb095b.tar.xz
Merge branch 'tb/crlf-conv-flags'
Code clean-up. * tb/crlf-conv-flags: convert_to_git(): safe_crlf/checksafe becomes int conv_flags
Diffstat (limited to 'config.c')
-rw-r--r--config.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/config.c b/config.c
index 70ce6e7041..b0c20e6cb8 100644
--- a/config.c
+++ b/config.c
@@ -1149,11 +1149,14 @@ static int git_default_core_config(const char *var, const char *value)
}
if (!strcmp(var, "core.safecrlf")) {
+ int eol_rndtrp_die;
if (value && !strcasecmp(value, "warn")) {
- safe_crlf = SAFE_CRLF_WARN;
+ global_conv_flags_eol = CONV_EOL_RNDTRP_WARN;
return 0;
}
- safe_crlf = git_config_bool(var, value);
+ eol_rndtrp_die = git_config_bool(var, value);
+ global_conv_flags_eol = eol_rndtrp_die ?
+ CONV_EOL_RNDTRP_DIE : CONV_EOL_RNDTRP_WARN;
return 0;
}