Uploaded image for project: 'Infrastructure'
  1. Infrastructure
  2. INFRA-18763

Please set core.autocrlf = true for Windows-based build machines

    XMLWordPrintableJSON

    Details

    • Project:
      Infrastructure

      Description

      Please:
      1) Revert https://issues.apache.org/jira/browse/INFRA-18383 (== set core.autocrlf=true)
      2) Add a comment that core.autocrlf = true must not be changed later, but if someone is having CRLF/LF issues, they should use .gitattributes file in their own repositories to make the configuration consistent across all checkouts.


      Background:
      0) GitHub recommends to configure core.autocrlf=true for Windows: https://help.github.com/en/articles/configuring-git-to-handle-line-endings
      1) Typically, Windows uses CRLF for line endings. In other words, "regular text editors" use CRLF for Windows
      2) Git has no preference to CRLF or LF. It could adhere to whatever user wants. Of course, Git can be configured to keep files as "binary" (which means do not convert between CRLF/LF)
      3) It is in line with SVN settings, and it is in line with what ASF recommends for SVN: https://www.apache.org/dev/svn-eol-style.txt


      So the proper approach is as follows:
      1) Windows-based host should have core.autocrlf=true. That would tell Git that **text** files should be converted to CRLF unless otherwise specified (by .gitattributes file)
      2) If certain files in the repository must have LF even at Windows checkout, then .gitattributes should be used to specify that

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                christ Chris Thistlethwaite
                Reporter:
                vladimirsitnikov Vladimir Sitnikov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Review Date:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m