From 2b6808531a5b038a0f780af4f8b92c4b27cdf010 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 29 Jan 2019 07:41:07 -0500 Subject: doc/gitattributes: clarify "autocrlf overrides eol" We only override core.eol with core.autocrlf when the latter is set to something besides "false". Let's make this more clear, and point the reader to the git-config definitions, which discuss this in more detail. Noticed-by: Sergey Lukashev Signed-off-by: Jeff King Signed-off-by: Junio C Hamano diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index b8392fc..ce383e9 100644 --- a/Documentation/gitattributes.txt +++ b/Documentation/gitattributes.txt @@ -124,7 +124,9 @@ 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` +Note that setting `core.autocrlf` to `true` or `input` overrides +`core.eol` (see the definitions of those options in +linkgit:git-config[1]). Set:: -- cgit v0.10.2-6-g49f6 From c9446f0504e4b785758eed0b63c7e00c1b7091ba Mon Sep 17 00:00:00 2001 From: Jeff King Date: Tue, 29 Jan 2019 07:41:12 -0500 Subject: docs/config: clarify "text property" in core.eol MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The word "property" is vague here. Let's spell out that we mean the path must be marked with the text attribute. While we're here, let's make the paragraph a little easier to read by de-emphasizing the "when core.autocrlf is false" bit. Putting it in the first sentence obscures the main content, and many readers won't care about autocrlf (i.e., anyone who is just following the gitattributes(7) advice, which mainly discusses "text" and "core.eol"). Helped-by: Torsten Bögershausen Signed-off-by: Jeff King Signed-off-by: Junio C Hamano diff --git a/Documentation/config/core.txt b/Documentation/config/core.txt index d0e6635..7e9b6c8 100644 --- a/Documentation/config/core.txt +++ b/Documentation/config/core.txt @@ -121,11 +121,14 @@ core.quotePath:: core.eol:: Sets the line ending type to use in the working directory for - files that have the `text` property set when core.autocrlf is false. + files that are marked as text (either by having the `text` + attribute set, or by having `text=auto` and Git auto-detecting + the contents as text). Alternatives are 'lf', 'crlf' and 'native', which uses the platform's native line ending. The default value is `native`. See linkgit:gitattributes[5] for more information on end-of-line - conversion. + conversion. Note that this value is ignored if `core.autocrlf` + is set to `true` or `input`. core.safecrlf:: If true, makes Git check if converting `CRLF` is reversible when -- cgit v0.10.2-6-g49f6