The Wayback Machine - https://web.archive.org/web/20200611055024/https://github.com/BurntSushi/ripgrep/issues/1375
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

--debug should print information about ignore files being read #1375

Open
blueyed opened this issue Sep 12, 2019 · 1 comment
Open

--debug should print information about ignore files being read #1375

blueyed opened this issue Sep 12, 2019 · 1 comment
Labels

Comments

@blueyed
Copy link
Contributor

@blueyed blueyed commented Sep 12, 2019

rg --debug should output information about ignore files being read.

Currently it outputs something like the following, but it is not clear where the patterns are coming from:

% rg --no-config --debug foo
DEBUG|rg::args|src/args.rs:544: not reading config files because --no-config is present
DEBUG|grep_regex::literal|grep-regex/src/literal.rs:59: literal prefixes detected: Literals { lits: [Complete(luarocks)], limit_size: 250, limit_class: 10 }
DEBUG|globset|globset/src/lib.rs:430: glob converted to regex: Glob { glob: "**/*~", re: "(?-u)^(?:/?|.*/)[^/]*\\~$", opts: GlobOptions { case_insensitive: false, literal_separator: true, backslash_escape: true }, tokens: Tokens([RecursivePrefix, ZeroOrMore, Literal('~')]) }
...

(This information (source filename) could also be displayed with Ignore / Whitelist instances in the debug log later on - or getting assigned a number, which then gets referenced from there (to shortness).)

ripgrep 11.0.2

@BurntSushi
Copy link
Owner

@BurntSushi BurntSushi commented May 8, 2020

This information (source filename) could also be displayed with Ignore / Whitelist instances in the debug log later on

Note that this already happens today. For example:

|ignore::walk|crates/ignore/src/walk.rs:1689: ignoring ./crates/regex/target: Ignore(IgnoreMatch(Gitignore(Glob { from: Some("./.gitignore"), original: "target", actual: "**/target", is_whitelist: false, is_only_dir: false })))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.