git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: unclear docs

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 28, 2019, 18:30 UTC
Message-ID
<xmqqzhrkab3s.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20190128160620.GA23588@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> I think it means:
>
>   - if core.autocrlf is false (the default), then the text attribute and
>     core.eol are used
>
>   - if core.autocrlf is true, then that overrides the whole
>     attribute/eol system
I think that matches my understanding.
> Subject: [PATCH] doc/gitattributes: clarify "autocrlf overrides eol"
>
> We only override core.eol with core.autocrlf when the latter is set to
> "true" (otherwise, core.eol would never do anything!). Let's make this

I fail to understand what "otherwise..." wants to say. When core.autocrlf is not "true", core.eol would not do anything?

But I can understand what the patch text says and it matches my understanding of the overriding behaviour, so let's queue it.

Thanks.
Show 22 quoted lines
> more clear, and point the reader to the git-config definitions, which
> discuss this in more detail.
>
> Noticed-by: Sergey Lukashev <lukashev.s@ya.ru>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  Documentation/gitattributes.txt | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt
> index b8392fc330..0ce8740e44 100644
> --- a/Documentation/gitattributes.txt
> +++ b/Documentation/gitattributes.txt
> @@ -124,7 +124,8 @@ 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` overrides `core.eol` (see
> +the definitions of those options in linkgit:git-config[1]).
>  
>  Set::
Previous: Jeff KingNext: Jeff King
Message 13 of 16 in “unclear docs”
  1. Sergey LukashevJan 27, 2019
  2. Sergey LukashevJan 27, 2019
  3. Jeff KingJan 28, 2019
  4. Sergey LukashevJan 28, 2019
  5. Jeff KingJan 28, 2019
  6. Torsten BögershausenJan 29, 2019
  7. Sergey LukashevJan 29, 2019
  8. 0/2 eol/autocrlf doc clarificationsJeff King, Jan 29, 2019
  9. 1/2 doc/gitattributes: clarify "autocrlf overrides eol"Jeff King, Jan 29, 2019
  10. 2/2 docs/config: clarify "text property" in core.eolJeff King, Jan 29, 2019
  11. Torsten BögershausenJan 28, 2019
  12. Jeff KingJan 28, 2019
  13. Junio C HamanoJan 28, 2019
  14. Jeff KingJan 28, 2019
  15. Sergey LukashevJan 28, 2019
  16. Jeff KingJan 28, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.