From d7f4633405acf3dc09798a759463c616c7c49dfd Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 13 Feb 2007 18:16:12 -0800 Subject: Make AutoCRLF ternary variable. This allows you to do: [core] AutoCRLF = input and it should do only the CRLF->LF translation (ie it simplifies CRLF only when reading working tree files, but when checking out files, it leaves the LF alone, and doesn't turn it into a CRLF). Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- config.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.c') diff --git a/config.c b/config.c index ffe02129a5..e8ae919b52 100644 --- a/config.c +++ b/config.c @@ -325,6 +325,10 @@ int git_default_config(const char *var, const char *value) } if (!strcmp(var, "core.autocrlf")) { + if (value && !strcasecmp(value, "input")) { + auto_crlf = -1; + return 0; + } auto_crlf = git_config_bool(var, value); return 0; } -- cgit v1.2.3