diff options
author | Torsten Bögershausen <tboegi@web.de> | 2016-06-28 10:01:13 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-06 11:53:51 -0700 |
commit | 6523728499e77afaed0008875b19b308682c3f88 (patch) | |
tree | 7b132c36c7f8b51ea7e1e7a85d7995617712f504 /Documentation/config.txt | |
parent | convert.c: ident + core.autocrlf didn't work (diff) | |
download | tgif-6523728499e77afaed0008875b19b308682c3f88.tar.xz |
convert: unify the "auto" handling of CRLF
Before this change,
$ echo "* text=auto" >.gitattributes
$ echo "* eol=crlf" >>.gitattributes
would have the same effect as
$ echo "* text" >.gitattributes
$ git config core.eol crlf
Since the 'eol' attribute had higher priority than 'text=auto', this may
corrupt binary files and is not what most users expect to happen.
Make the 'eol' attribute to obey 'text=auto' and now
$ echo "* text=auto" >.gitattributes
$ echo "* eol=crlf" >>.gitattributes
behaves the same as
$ echo "* text=auto" >.gitattributes
$ git config core.eol crlf
In other words,
$ echo "* text=auto eol=crlf" >.gitattributes
has the same effect as
$ git config core.autocrlf true
and
$ echo "* text=auto eol=lf" >.gitattributes
has the same effect as
$ git config core.autocrlf input
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/config.txt')
-rw-r--r-- | Documentation/config.txt | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 4a27ad41cb..62ade8b758 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -389,13 +389,11 @@ file with mixed line endings would be reported by the `core.safecrlf` mechanism. core.autocrlf:: - Setting this variable to "true" is almost the same as setting - the `text` attribute to "auto" on all files except that text - files are not guaranteed to be normalized: files that contain - `CRLF` in the repository will not be touched. Use this - setting if you want to have `CRLF` line endings in your - working directory even though the repository does not have - normalized line endings. This variable can be set to 'input', + Setting this variable to "true" is the same as setting + the `text` attribute to "auto" on all files and core.eol to "crlf". + Set to true if you want to have `CRLF` line endings in your + working directory and the repository has LF line endings. + This variable can be set to 'input', in which case no output conversion is performed. core.symlinks:: |