Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8241768

git needs .gitattributes

XMLWordPrintable

    • b15
    • generic
    • windows

        git has a idiosyncrasy in that when using git clone on Windows machines it forces adding CR-LF line terminations by default on Windows.

        This causes a host of problems:
        1 newer version of Cygwin bash will fail as follows:
        configure: line 24: $'\r': command not found
        configure: line 27: $'\r': command not found
        configure: line 30: cd: $'.\r': No such file or directory
         configure: line 31: $'\r': command not found

        2. This is likely to cause issues when folks generate webrevs or diffs.

        The solution, we need to add .gitattributes at the top of the repository as described below:
        https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings

        Using Cygwin's git does not exhibit the above problem.

              ihse Magnus Ihse Bursie
              ksrini Kumar Srinivasan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: