Web lists-archives.com

Re: unclear docs

Jeff King <peff@xxxxxxxx> writes:

> 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.


> more clear, and point the reader to the git-config definitions, which
> discuss this in more detail.
> Noticed-by: Sergey Lukashev <lukashev.s@xxxxx>
> Signed-off-by: Jeff King <peff@xxxxxxxx>
> ---
>  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::