aboutsummaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2007-02-13 18:16:12 -0800
committerJunio C Hamano <junkio@cox.net>2007-02-14 11:19:28 -0800
commitd7f4633405acf3dc09798a759463c616c7c49dfd (patch)
tree87ca32525975b0762c1bdad688b223cca48ebf4c /config.c
parent6c510bee2013022fbce52f4b0ec0cc593fc0cc48 (diff)
downloadgit-d7f4633405acf3dc09798a759463c616c7c49dfd.tar.gz
git-d7f4633405acf3dc09798a759463c616c7c49dfd.tar.xz
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 <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.c b/config.c
index ffe02129a..e8ae919b5 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;
}