diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-09-08 21:35:51 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-08 21:35:52 -0700 |
commit | 7f5885ad2abfbf9b760e2f32f70537d1c380734d (patch) | |
tree | f2a636bb35db7ea784c2ae08259cfca6bfb6a1a6 /Documentation | |
parent | faacc8efe503a470c0c549c7949824728d7f1461 (diff) | |
parent | 1335d76e4569fa84e52dc24c88c04daeae6e160e (diff) | |
download | git-7f5885ad2abfbf9b760e2f32f70537d1c380734d.tar.gz git-7f5885ad2abfbf9b760e2f32f70537d1c380734d.tar.xz |
Merge branch 'jc/renormalize-merge-kill-safer-crlf' into maint
"git merge" with renormalization did not work well with
merge-recursive, due to "safer crlf" conversion kicking in when it
shouldn't.
* jc/renormalize-merge-kill-safer-crlf:
merge: avoid "safer crlf" during recording of merge results
convert: unify the "auto" handling of CRLF
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/config.txt | 12 | ||||
-rw-r--r-- | Documentation/gitattributes.txt | 15 |
2 files changed, 14 insertions, 13 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt index 6ad3eb66d..f4721a048 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -405,13 +405,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:: diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index 145dd1096..6d20400e7 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -115,6 +115,7 @@ text file is normalized, its line endings are converted to LF in the repository. To control what line ending style is used in the working directory, use the `eol` attribute for a single file and the `core.eol` configuration variable for all text files. +Note that `core.autocrlf` overrides `core.eol` Set:: @@ -130,8 +131,9 @@ Unset:: Set to string value "auto":: When `text` is set to "auto", the path is marked for automatic - end-of-line normalization. If Git decides that the content is - text, its line endings are normalized to LF on checkin. + end-of-line conversion. If Git decides that the content is + text, its line endings are converted to LF on checkin. + When the file has been commited with CRLF, no conversion is done. Unspecified:: @@ -146,7 +148,7 @@ unspecified. ^^^^^ This attribute sets a specific line-ending style to be used in the -working directory. It enables end-of-line normalization without any +working directory. It enables end-of-line conversion without any content checks, effectively setting the `text` attribute. Set to string value "crlf":: @@ -186,9 +188,10 @@ the working directory, and prevent .jpg files from being normalized regardless of their content. ------------------------ +* text=auto *.txt text -*.vcproj eol=crlf -*.sh eol=lf +*.vcproj text eol=crlf +*.sh text eol=lf *.jpg -text ------------------------ @@ -198,7 +201,7 @@ normalization in Git. If you simply want to have CRLF line endings in your working directory regardless of the repository you are working with, you can set the -config variable "core.autocrlf" without changing any attributes. +config variable "core.autocrlf" without using any attributes. ------------------------ [core] |