[openstreetmap/openstreetmap-website] Add gitattribute to fix line endings (#3313)

Tom Hughes notifications at github.com
Tue Sep 7 12:53:12 UTC 2021


Well my reading `gitattributes(5)` doesn't support that. It says:

>            Set to string value "auto"
>                When text is set to "auto", the path is marked for automatic
>                end-of-line conversion. If Git decides that the content is
>                text, its line endings are converted to LF on checkin. When the
>                file has been committed with CRLF, no conversion is done.

which I took to mean that it always converted to CRLF and ignored the `eol` attribute.

Equally looking at the documentation for `eol` it says:

>        eol
>            This attribute sets a specific line-ending style to be used in the
>            working directory. It enables end-of-line conversion without any
>            content checks, effectively setting the text attribute. 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.

which appears to say that setting it implies `text=true` forcing conversion for all files and disabling detection of text files.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3313#issuecomment-914280967
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20210907/5c76ed0e/attachment.htm>


More information about the rails-dev mailing list