|
|
@@ -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 there’s 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 aren’t 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)]
|