Repository navigation
chore: ignore symlinks at the generated proto and node_modules paths - #8887
Merged
Merged
Conversation
The patterns ended in '/', which only matches directories. A symlink at amber/src/main/python/proto or node_modules (handy when sharing generated code or dependencies across worktrees) was not ignored, so it could be committed by accident. Drop the trailing slash so files, symlinks and directories at those paths are all ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Automated Reviewer SuggestionsBased on the
|
Contributor
Author
|
/request-review @parshimers |
parshimers
approved these changes
Oct 7, 2026
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.
What changes were proposed in this PR?
Two
.gitignorepatterns end in/, which only matches directories:A symlink at either path isn't ignored. This is easy to hit when you run tests in a second worktree and symlink the generated protos or
node_modulesfrom your main checkout instead of regenerating them. Agit add -Athen commits the symlink.That happened to me in #8769: the symlink got committed, and CI's
bin/python-proto-gen.shfailed withmkdir: cannot create directory '.../amber/src/main/python/proto': File exists, so every job stopped before running tests.This drops the trailing slash on both lines, so files, symlinks and directories at those paths are all ignored.
Any related issues, documentation, discussions?
Found while working on #8769.
How was this PR tested?
In a scratch repo with a symlink at
amber/src/main/python/protoand atagent-service/node_modules:git statusas untrackedReal directories at those paths are still ignored, since a pattern without a trailing slash matches directories too.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Claude Opus 5.5)