-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
gitignoreBugs related to gitignore problems.Bugs related to gitignore problems.invalidAn issue that is not actually a bug or a feature that already exists.An issue that is not actually a bug or a feature that already exists.
Description
Given a .gitignore file:
*
!./PKGBUILD
rg will skip the PKGBUILD file:
DEBUG|ignore::walk|ignore/src/walk.rs:1639: ignoring ./PKGBUILD: Ignore(IgnoreMatch(Gitignore(Glob { from: Some("./.gitignore"), original: "", actual: "**/", is_whitelist: false, is_only_dir: false })))
This appears to be due to the leading dot there.
Git handles this as expected.
Removing the dot (using !/PKGBUILD) whitelists it then:
DEBUG|ignore::walk|ignore/src/walk.rs:1642: whitelisting ./PKGBUILD: Whitelist(IgnoreMatch(Gitignore(Glob { from: Some("./.gitignore"), original: "!/PKGBUILD", actual: "PKGBUILD", is_whitelist: true, is_only_dir: false })))
What version of ripgrep are you using?
ripgrep 11.0.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
gitignoreBugs related to gitignore problems.Bugs related to gitignore problems.invalidAn issue that is not actually a bug or a feature that already exists.An issue that is not actually a bug or a feature that already exists.