From 942e7747678ecf5f118ea5b2d0c763166de21f3a Mon Sep 17 00:00:00 2001 From: Eyvind Bernhardsen Date: Fri, 4 Jun 2010 21:29:08 +0200 Subject: Add "core.eol" config variable Introduce a new configuration variable, "core.eol", that allows the user to set which line endings to use for end-of-line-normalized files in the working directory. It defaults to "native", which means CRLF on Windows and LF everywhere else. Note that "core.autocrlf" overrides core.eol. This means that [core] autocrlf = true puts CRLFs in the working directory even if core.eol is set to "lf". Signed-off-by: Eyvind Bernhardsen Signed-off-by: Junio C Hamano --- cache.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index e1a2e14fd9..ebe71c7e87 100644 --- a/cache.h +++ b/cache.h @@ -556,6 +556,19 @@ enum auto_crlf { extern enum auto_crlf auto_crlf; +enum eol { + EOL_UNSET, + EOL_CRLF, + EOL_LF, +#ifdef NATIVE_CRLF + EOL_NATIVE = EOL_CRLF +#else + EOL_NATIVE = EOL_LF +#endif +}; + +extern enum eol eol; + enum branch_track { BRANCH_TRACK_UNSPECIFIED = -1, BRANCH_TRACK_NEVER = 0, -- cgit v1.2.1