This commit is contained in:
Martin Pool 2025-07-05 15:10:51 +02:00 committed by GitHub
commit 98cfdf7d38
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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