Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8267892: Add .gitattributes to repo #523

Closed

Conversation

kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented May 27, 2021

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 and this comment in PR #518.

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


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/523/head:pull/523
$ git checkout pull/523

Update a local copy of the PR:
$ git checkout pull/523
$ git pull https://git.openjdk.java.net/jfx pull/523/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 523

View PR using the GUI difftool:
$ git pr show -t 523

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/523.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 27, 2021

👋 Welcome back kcr! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Ready for review label May 27, 2021
@mlbridge
Copy link

mlbridge bot commented May 27, 2021

Webrevs

Copy link
Member

@arapte arapte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
Git documentation which explains the usage : https://git-scm.com/docs/gitattributes#_text

@openjdk
Copy link

openjdk bot commented May 28, 2021

@kevinrushforth This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8267892: Add .gitattributes to repo

Reviewed-by: arapte, pbansal

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Ready to be integrated label May 28, 2021
Copy link
Collaborator

@pankaj-bansal pankaj-bansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@kevinrushforth
Copy link
Member Author

/integrate

@openjdk openjdk bot closed this May 28, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Ready to be integrated rfr Ready for review labels May 28, 2021
@openjdk
Copy link

openjdk bot commented May 28, 2021

@kevinrushforth Pushed as commit 5e6d442.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@kevinrushforth kevinrushforth deleted the 8267892-gitattributes branch June 1, 2021 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
3 participants