-
Notifications
You must be signed in to change notification settings - Fork 5.9k
8357920: Add .rej and .orig to .gitignore #25474
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
Conversation
👋 Welcome back ihse! A progress list of the required criteria for merging this PR into |
@magicus 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:
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 23 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate auto |
@magicus This pull request will be automatically integrated when it is ready |
@@ -23,3 +23,5 @@ NashornProfile.txt | |||
/.gdbinit | |||
/.lldbinit | |||
**/core.[0-9]* | |||
*.rej |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about use below config instead. It will ignore all the related diff files in root directory and in the any sub-directory.
**/*.rej
**/*.orig
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Patterns without a /
in them will match in all subdirectories, so your suggestion is just redundant. I see we have some places where this was done previously; maybe we should remove that to avoid the confusion. **
is only relevant if you want to do something like src/**/*.java
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if you really wanted to just match files in the root directory, you'd have to write /*.rej
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/integrate |
Going to push as commit 7bd8375.
Your commit was automatically rebased without conflicts. |
Not sure this is helping. When I do "git status" now, I can't see the *.rej files, so I have to remove the filter from .gitignore. |
To see ignored files, there is a switch:
It will show all ignored files and directories though so includes the build dir, but could still help you. |
Why would you want to do that? |
To see what I couldn't merge or apply without a conflict. |
+1 I think I hate this change. I just wasted some time on that very problem. If those files exist, they are interesting. They just shouldn't be committed. This change treats them as uninteresting. |
I am open for reverting this if it causes trouble in established workflows. But the problem with committed .rej files is real too, and I'm not sure how to solve that without using .gitignore. I think we need to either: A) establish that this new behavior is much worse than the risk for integrating unwanted files (if so, we can just revert this), or B) find another solution that allows us to remove this change but still catch the unwanted .rej and .orig files. I don't have any good suggestions on B, and I am not sure how we could decide if A is applicable or not. |
This does seem like a reasonably easy check for jcheck to perform, at least in theory. It could be configured with a regex for file name patterns we don't want. |
The file types .rej and .orig are often created by diff tools. Adding them to .gitignore will help people from mistakenly committing these files.
See #25306 (comment) for an example of where this happened.
Progress
Issue
Backport <hash>
with the hash of the original commit. See Backports.Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/25474/head:pull/25474
$ git checkout pull/25474
Update a local copy of the PR:
$ git checkout pull/25474
$ git pull https://git.openjdk.org/jdk.git pull/25474/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 25474
View PR using the GUI difftool:
$ git pr show -t 25474
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/25474.diff
Using Webrev
Link to Webrev Comment