Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive glob patterns broken in 0.2.5 #206

Closed
alejandro5042 opened this issue Oct 31, 2016 · 3 comments
Closed

Recursive glob patterns broken in 0.2.5 #206

alejandro5042 opened this issue Oct 31, 2016 · 3 comments
Labels
bug A bug.

Comments

@alejandro5042
Copy link
Contributor

alejandro5042 commented Oct 31, 2016

In an empty directory, create a file test\file.txt with contents hi. For simplicity of testing, make copies of rg.exe versions 0.2.3 and 0.2.5 and rename them according to their version.

0.08 - C:\Dev\Temp\rg-bug-subdirs> rg-v0.2.3 -g *.txt hi
test\file.txt
1:hi

0.03 - C:\Dev\Temp\rg-bug-subdirs> rg-v0.2.5 -g *.txt hi
No files were searched, which means ripgrep probably applied a filter you didn't expect. Try running again with --debug.

Running with --debug:

0.04 - C:\Dev\Temp\rg-bug-subdirs> rg-v0.2.5 --debug -g *.txt hi
DEBUG:rg::args: will try to use memory maps
DEBUG:globset: built glob set; 0 literals, 0 basenames, 1 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes
DEBUG:grep::search: regex ast:
Literal {
    chars: [
        'h',
        'i'
    ],
    casei: false
}
DEBUG:grep::literals: literal prefixes detected: Literals { lits: [Complete(hi)], limit_size: 250, limit_class: 10 }
DEBUG:ignore::walk: ignoring ./test: Ignore(IgnoreMatch(Override(Glob(UnmatchedIgnore))))
No files were searched, which means ripgrep probably applied a filter you didn't expect. Try running again with --debug.

However, move that file outside of the test directory to the current/root directory and it works.

@BurntSushi BurntSushi added the bug A bug. label Oct 31, 2016
@BurntSushi
Copy link
Owner

This was a nice find, thank you! It slipped in with my latest changes to the ignore matcher code, but now there's a regression test for it. :-)

@BurntSushi
Copy link
Owner

I think this is a bad bug, so I've kicked off a 0.2.6 release.

@alejandro5042
Copy link
Contributor Author

I can confirm the latest 0.2.6 fixes this issue and passes my tests. Great turn around - thanks! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug.
Projects
None yet
Development

No branches or pull requests

2 participants