1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-11-23 21:54:45 +02:00

ignore/doc: explain that require_git(false) will ascend above git roots

This should hopefully help avoid confusion about #2812 as encountered
in https://github.com/sourcefrog/cargo-mutants/issues/450.

Closes #2937
This commit is contained in:
Martin Pool
2024-11-23 11:15:32 -08:00
committed by Andrew Gallant
parent ab4665a164
commit 99b7957122

View File

@@ -798,6 +798,10 @@ impl WalkBuilder {
///
/// When disabled, git-related ignore rules are applied even when searching
/// outside a git repository.
///
/// In particular, if this is `false` then `.gitignore` files will be read
/// from parent directories above the git root directory containing `.git`,
/// which is different from the git behavior.
pub fn require_git(&mut self, yes: bool) -> &mut WalkBuilder {
self.ig_builder.require_git(yes);
self