WorkingTreeIterator: Fix relative core.excludesFile - #284
Open
arimu1 wants to merge 1 commit into
Open
Conversation
C Git resolves a relative core.excludesFile path against the repository work tree root. JGit passed null to Config.getPath, which uses the Java process current directory, so the same relative path was missed when status ran from a subdirectory. Fixes eclipse-jgit#280 Change-Id: I7cf1a7d768068b475388a81d274f92ef85743618
Member
|
Please follow the steps in the contributor guide to push this change to GerritHub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thank you for contributing to JGit!
JGit uses GerritHub for code changes and review, therefore pull requests in this repository cannot be merged.
Please make sure you have read the section on contributing patches of the Contributor Guide.
Summary
core.excludesFileagainst the work tree root. JGit passednulltoConfig.getPath, which uses the process current directory, sojgit statusmissed the file when run from a subdirectory.WorkingTreeIterator.RootIgnoreNodenow resolves the path againstrepository.getWorkTree().~/expansion is unchanged.Test plan
IgnoreNodeTest#testRelativeCoreExcludesFileResolvedAgainstWorkTreeStatusCommandTest#testRelativeCoreExcludesFile(issue A relative path in core.excludesFiles is not resolved against repository root #280 layout:sub/myexclusions+ignoringfiles)IgnoreNodeTest+StatusCommandTest(43 tests) on JDK 17:Result: Tests run: 43, Failures: 0, Errors: 0
Gerrit Change-Id:
I7cf1a7d768068b475388a81d274f92ef85743618I could not push to GerritHub from this environment (no GerritHub SSH/HTTP credentials). Happy to push the same commit to
refs/for/masteronce access is available.