Skip to content

Recursive glob patterns broken in 0.2.5 #206

@alejandro5042

Description

@alejandro5042

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions