Skip to content

ignore: fix problem with searching whitelisted hidden files#3174

Merged
BurntSushi merged 1 commit intomasterfrom
ag/fix-3173
Oct 9, 2025
Merged

ignore: fix problem with searching whitelisted hidden files#3174
BurntSushi merged 1 commit intomasterfrom
ag/fix-3173

Conversation

@BurntSushi
Copy link
Owner

... specifically, when the whitelist comes from a parent gitignore
file.

Our handling of parent gitignores is pretty ham-fisted and has been a
source of some unfortunate bugs. The problem is that we need to strip
the parent path from the path we're searching in order to correctly
apply the globs. But getting this stripping correct seems to be a subtle
affair.

Fixes #3173

... specifically, when the whitelist comes from a _parent_ gitignore
file.

Our handling of parent gitignores is pretty ham-fisted and has been a
source of some unfortunate bugs. The problem is that we need to strip
the parent path from the path we're searching in order to correctly
apply the globs. But getting this stripping correct seems to be a subtle
affair.

Fixes #3173
@BurntSushi BurntSushi merged commit 0407e10 into master Oct 9, 2025
20 checks passed
@BurntSushi BurntSushi deleted the ag/fix-3173 branch October 9, 2025 01:17
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.

hidden files whitelisted by ancestor .ignore are not searched when . is directory argument

1 participant