]> git.ipfire.org Git - thirdparty/git.git/commitdiff
doc: clarify interaction between 'eol' and text=auto
authorbrian m. carlson <sandals@crustytoothpaste.net>
Mon, 14 Feb 2022 18:15:43 +0000 (10:15 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Feb 2022 21:01:25 +0000 (13:01 -0800)
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>
Documentation/gitattributes.txt

index 60984a468245258337ed8da33f5d559ad780615b..a71dad267404bc61f21b4e235acf5a975115d8b4 100644 (file)
@@ -161,11 +161,12 @@ unspecified.
 
 This attribute sets a specific line-ending style to be used in the
 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
-is detected as text.  Note that setting this attribute on paths which
-are in the index with CRLF line endings may make the paths to be
-considered dirty. Adding the path to the index again will normalize the
-line endings in the index.
+attribute is set or unspecified, or if it is set to `auto`, the file is
+detected as text, and it is stored with LF endings in the index.  Note
+that setting this attribute on paths which are in the index with CRLF
+line endings may make the paths to be considered dirty unless
+`text=auto` is set. Adding the path to the index again will normalize
+the line endings in the index.
 
 Set to string value "crlf"::