Skip to content

Commit 6a5678f

Browse files
bk2204gitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8c591db commit 6a5678f

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Documentation/gitattributes.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,12 @@ unspecified.
161161

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

170171
Set to string value "crlf"::
171172

0 commit comments

Comments
 (0)