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>
This commit is contained in:
Linus Torvalds
2007-02-13 18:16:12 -08:00
committed by Junio C Hamano
parent 6c510bee20
commit d7f4633405
3 changed files with 6 additions and 2 deletions

View File

@ -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;
}