You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a .gitignore file that contains something like this:
vendor/**
!vendor/manifest
I'd expect vendor/manifest to be searched, but nothing else in the vendor directory, but instead it seems like vendor/manifest is ignored too. If I remove the vendor/** line, the search does what I expect it to.
The text was updated successfully, but these errors were encountered:
This is an interesting case, because rg will avoid descending into the vendor, which appears wrong, since vendor itself shouldn't be ignored. From man gitignore:
· A trailing "/**" matches everything inside. For example, "abc/**" matches all files inside directory "abc",
relative to the location of the .gitignore file, with infinite depth.
(Running rg with the --debug flag told me that vendor itself was ignored. rg never even sees vendor/manifest.)
BurntSushi
changed the title
Negated gitignore patterns aren't supported
trailing recursive globs shouldn't ignore the directory itself, only its contents
Sep 24, 2016
A standard glob of `foo/**` will match `foo`, but gitignore semantics
specify that `foo/**` should only match the contents of `foo` and not
`foo` itself. We capture those semantics by translating `foo/**` to
`foo/**/*`.
FixesBurntSushi#30.
I have a .gitignore file that contains something like this:
I'd expect
vendor/manifest
to be searched, but nothing else in thevendor
directory, but instead it seems likevendor/manifest
is ignored too. If I remove thevendor/**
line, the search does what I expect it to.The text was updated successfully, but these errors were encountered: