Rust_Search icon indicating copy to clipboard operation
Rust_Search copied to clipboard

Hard-coded `git_ignore(true)` in walker limits usefulness of this crate

Open tgrushka opened this issue 11 months ago • 0 comments

src/search.rs, line 82:

impl Search {
...
    pub(crate) fn new(
...
    ) -> Self {
        let regex_search_input =
            utils::build_regex_search_input(search_input, file_ext, strict, ignore_case);

        let mut walker = WalkBuilder::new(search_location);

        walker
            .hidden(!with_hidden)
            .git_ignore(true) // <----------
            .max_depth(depth)
            .threads(cmp::min(12, num_cpus::get()));

This is really bad. I'm trying to use a downstream crate that depends on this one, and it's missing a lot of files due to this hard-coding. I'm sorry, I just don't believe this is hard-coded like this.

I don't know how many people are depending on this, but they may not want to exclude .gitignored files!!!

Please remove this or add a SearchBuilder config option!!

tgrushka avatar Jan 27 '25 22:01 tgrushka