Update comments about how the --git-ignore option is handled

This commit is contained in:
ariasuni 2021-05-04 22:42:15 +02:00
parent 7c80070120
commit 90416ed3ce

View File

@ -59,9 +59,6 @@ pub struct FileFilter {
pub ignore_patterns: IgnorePatterns,
/// Whether to ignore Git-ignored patterns.
/// This is implemented completely separately from the actual Git
/// repository scanning — a `.gitignore` file will still be scanned even
/// if theres no `.git` folder present.
pub git_ignore: GitIgnore,
}
@ -335,24 +332,17 @@ impl IgnorePatterns {
}
/// Whether to ignore or display files that are mentioned in `.gitignore` files.
/// Whether to ignore or display files that Git would ignore.
#[derive(PartialEq, Debug, Copy, Clone)]
pub enum GitIgnore {
/// Ignore files that Git would ignore. This means doing a check for a
/// `.gitignore` file, possibly recursively up the filesystem tree.
/// Ignore files that Git would ignore.
CheckAndIgnore,
/// Display files, even if Git would ignore them.
Off,
}
// This is not fully baked yet. The `ignore` crate lists a lot more files that
// we arent checking:
//
// > By default, all ignore files found are respected. This includes .ignore,
// > .gitignore, .git/info/exclude and even your global gitignore globs,
// > usually found in $XDG_CONFIG_HOME/git/ignore.
#[cfg(test)]