doc: clarify interaction between 'eol' and text=auto

The `eol` takes effect on text files only when the index has the
contents in LF line endings.  Paths with contents in CRLF line
endings in the index may become dirty unless text=auto.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
brian m. carlson 2022-02-14 10:15:43 -08:00 committed by Junio C Hamano
parent 8c591dbfce
commit 6a5678f257
1 changed files with 6 additions and 5 deletions

View File

@ -161,11 +161,12 @@ unspecified.


This attribute sets a specific line-ending style to be used in the This attribute sets a specific line-ending style to be used in the
working directory. This attribute has effect only if the `text` working directory. This attribute has effect only if the `text`
attribute is set or unspecified, or if it is set to `auto` and the file attribute is set or unspecified, or if it is set to `auto`, the file is
is detected as text. Note that setting this attribute on paths which detected as text, and it is stored with LF endings in the index. Note
are in the index with CRLF line endings may make the paths to be that setting this attribute on paths which are in the index with CRLF
considered dirty. Adding the path to the index again will normalize the line endings may make the paths to be considered dirty unless
line endings in the index. `text=auto` is set. Adding the path to the index again will normalize
the line endings in the index.


Set to string value "crlf":: Set to string value "crlf"::