aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorTorsten Bögershausen <tboegi@web.de>2016-04-25 18:56:29 +0200
committerJunio C Hamano <gitster@pobox.com>2016-04-25 12:11:45 -0700
commit70ad8c8d8c0840fb89492063274132d28bdfbe3b (patch)
treeb7dc574bd123842038e3ea2500112f3d704657c8 /config.c
parentded2444ad8ab8128cae2b91b8efa57ea2dd8c7a5 (diff)
downloadgit-70ad8c8d8c0840fb89492063274132d28bdfbe3b.tar.gz
git-70ad8c8d8c0840fb89492063274132d28bdfbe3b.tar.xz
convert: allow core.autocrlf=input and core.eol=crlf
Even though the configuration parser errors out when core.autocrlf is set to 'input' when core.eol is set to 'crlf', there is no need to do so, because the core.autocrlf setting trumps core.eol. Allow all combinations of core.crlf and core.eol and document that core.autocrlf overrides core.eol. Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/config.c b/config.c
index 9ba40bc1b..a6adc8bc9 100644
--- a/config.c
+++ b/config.c
@@ -803,8 +803,6 @@ static int git_default_core_config(const char *var, const char *value)
if (!strcmp(var, "core.autocrlf")) {
if (value && !strcasecmp(value, "input")) {
- if (core_eol == EOL_CRLF)
- return error("core.autocrlf=input conflicts with core.eol=crlf");
auto_crlf = AUTO_CRLF_INPUT;
return 0;
}
@@ -830,8 +828,6 @@ static int git_default_core_config(const char *var, const char *value)
core_eol = EOL_NATIVE;
else
core_eol = EOL_UNSET;
- if (core_eol == EOL_CRLF && auto_crlf == AUTO_CRLF_INPUT)
- return error("core.autocrlf=input conflicts with core.eol=crlf");
return 0;
}