Repository navigation
Apply .gitignore files above a path-table's scan start - #1278
Merged
Merged
Conversation
Red: a path-table scan starting below the index root, or an index root inside a repo, ignores the .gitignore files above it.
Load every .gitignore from the nearest repo root, or the index root with no repo, down to the directory the scan starts in. The stat module now takes the index root, as the parsed module already did.
…gitignore # Conflicts: # packages/rust/src/scanner.rs # testing-conventions.toml
Red: with no enclosing .git, a .gitignore of * still hides a ~/.claude-shaped tree. Gitignore fixtures now hold .git so their rules stay in force.
This was referenced Oct 5, 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.
Fixes #1272
Fixes #1296
A
.gitignoreapplies to path-tables only inside a git repo, as in git, fd and ripgrep. With no enclosing.git, none applies: not at the index root, not above the scan start, not below it. A~/.claudewhose.gitignoreis*now lists its files, from its root or by absolute path from its parent; aftergit initit lists nothing.Inside a repo, a scan applies every
.gitignorefrom the repo root (the nearest directory holding.git) down, including those above its starting directory, asgit check-ignoredoes.'./docs/*.log'and'./**/z.log'now agree. A walk that enters a directory holding.gitstarts applying.gitignorefiles from there.Naming a gitignored directory (
'./dist') still scans it: ancestor rules filter the entries below the start, never the start itself.The
dirsql contextguide (docs/context/usage.md,troubleshooting.md) anddocs/reference/path-tables.mdstate the repo-only rule.E2E Verification
cargo test --workspace --features cli)packages/python/e2e-attestations/<branch>.jsonreceipt written ifpackages/pythonchanged (just e2e-attest-python)packages/ts/e2e-attestations/<branch>.jsonreceipt written ifpackages/tschanged (just e2e-attest-ts)cargo test --workspace --features cli,just e2e-attest-python,just e2e-attest-tsChangelog / Migrations
<root>/<pkg>/changelog.d/for each changed package<root>/<pkg>/migrations.d/for each changed package