On Thu, 27 May 2021 22:14:51 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
> This fix adds a `.gitattributes` file to prevent git from replacing line > endings if the global `.gitconfig` file on the client system is configured > with core.autocrlf = true (which it is by default when using the native Git > for Windows). > > This can cause build or test problems with scripts or other files that expect > Unix-style line endings. For two recent examples of such problems, see > [JDK-8267694](https://bugs.openjdk.java.net/browse/JDK-8267694) and [this > comment in PR > #518](https://github.com/openjdk/jfx/pull/518#issuecomment-849966053). > > To test this, I set `core.autocrlf = true` in my `$HOME/.gitconfig` and > cloned the master branch of the jfx repo into a new local repo. The files all > had CRLF line endings. I then cloned the branch with the fix for this PR into > a new repo and verified that the line endings are correctly left alone (LF > line endings). > > As a second test, here is a failing GHA build of the patch from PR #518 that > fails as expected due to this bug: > > https://github.com/kevinrushforth/jfx/actions/runs/883603338 > > Here is a GHA build of that same branch, plus the commit to add > `.gitattributes`: > > https://github.com/kevinrushforth/jfx/actions/runs/883620592 This pull request has now been integrated. Changeset: 5e6d4429 Author: Kevin Rushforth <k...@openjdk.org> URL: https://git.openjdk.java.net/jfx/commit/5e6d4429159e3fab9ec0aab9720393850d179710 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8267892: Add .gitattributes to repo Reviewed-by: arapte, pbansal ------------- PR: https://git.openjdk.java.net/jfx/pull/523