"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes: > I was answering a question on StackOverflow recently about the > interaction between text=auto and eol, and someone pointed out to me > that what I had written, which was based on the documentation, was not > correct as of Git 2.10 (and more specifically 6523728499 ("convert: > unify the "auto" handling of CRLF", 2016-06-28)). > > When I set out to document the behavior correctly, I ran into the fact > that the tests, where I looked for examples of how this behaves, didn't > have any tests for some of these cases, and so I had some trouble > documenting this clearly and accurately. So this series basically just > adds some tests for existing behavior so we don't change it (and so I > could figure out how it works) and then updates the documentation > accordingly. This seems to be a replacement of the two-patch series that was merged to 'master' at 8db2f665 (Merge branch 'bc/clarify-eol-attr', 2022-02-11) and was merged to 'next' at dc1db4bd (Merge branch 'bc/clarify-eol-attr' into next, 2022-02-04). The changes seem to be in the second step to update Documentation/gitattributes.txt and it needs to be made an incremental update. Thanks. ---- >8 ----- From: brian m. carlson <sandals@xxxxxxxxxxxxxxxxxxxx> Subject: 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@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> --- Documentation/gitattributes.txt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git c/Documentation/gitattributes.txt w/Documentation/gitattributes.txt index 60984a4682..a71dad2674 100644 --- c/Documentation/gitattributes.txt +++ w/Documentation/gitattributes.txt @@ -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"::