Skip to content

WorkingTreeIterator: Fix relative core.excludesFile - #284

Open
arimu1 wants to merge 1 commit into
eclipse-jgit:masterfrom
arimu1:fix-280-relative-excludesfile
Open

WorkingTreeIterator: Fix relative core.excludesFile#284
arimu1 wants to merge 1 commit into
eclipse-jgit:masterfrom
arimu1:fix-280-relative-excludesfile

Conversation

@arimu1

@arimu1 arimu1 commented Aug 16, 2026

Copy link
Copy Markdown

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

  • Fixes A relative path in core.excludesFiles is not resolved against repository root #280
  • C Git resolves a relative core.excludesFile against the work tree root. JGit passed null to Config.getPath, which uses the process current directory, so jgit status missed the file when run from a subdirectory.
  • WorkingTreeIterator.RootIgnoreNode now resolves the path against repository.getWorkTree(). ~/ expansion is unchanged.

Test plan

JAVA_HOME=<jdk17> mvn -pl org.eclipse.jgit.test -am test \
  -Dtest=IgnoreNodeTest,StatusCommandTest \
  -Dsurefire.failIfNoSpecifiedTests=false

Result: Tests run: 43, Failures: 0, Errors: 0

Gerrit Change-Id: I7cf1a7d768068b475388a81d274f92ef85743618

I could not push to GerritHub from this environment (no GerritHub SSH/HTTP credentials). Happy to push the same commit to refs/for/master once access is available.

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
@msohn

msohn commented Aug 17, 2026

Copy link
Copy Markdown
Member

Please follow the steps in the contributor guide to push this change to GerritHub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A relative path in core.excludesFiles is not resolved against repository root

2 participants