summaryrefslogtreecommitdiffstats
path: root/src/args.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/args.rs')
-rw-r--r--src/args.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/args.rs b/src/args.rs
index 914a2a7c..e2a5a09f 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -791,13 +791,10 @@ impl ArgMatches {
.types(self.types()?)
.hidden(!self.hidden())
.parents(!self.no_ignore_parent())
- .ignore(!self.no_ignore())
- .git_global(
- !self.no_ignore()
- && !self.no_ignore_vcs()
- && !self.no_ignore_global())
- .git_ignore(!self.no_ignore() && !self.no_ignore_vcs())
- .git_exclude(!self.no_ignore() && !self.no_ignore_vcs())
+ .ignore(!self.no_ignore_dot())
+ .git_global(!self.no_ignore_vcs() && !self.no_ignore_global())
+ .git_ignore(!self.no_ignore_vcs())
+ .git_exclude(!self.no_ignore_vcs())
.ignore_case_insensitive(self.ignore_file_case_insensitive());
if !self.no_ignore() {
builder.add_custom_ignore_filename(".rgignore");
@@ -1103,6 +1100,11 @@ impl ArgMatches {
self.is_present("no-ignore") || self.unrestricted_count() >= 1
}
+ /// Returns true if .ignore files should be ignored.
+ fn no_ignore_dot(&self) -> bool {
+ self.is_present("no-ignore-dot") || self.no_ignore()
+ }
+
/// Returns true if global ignore files should be ignored.
fn no_ignore_global(&self) -> bool {
self.is_present("no-ignore-global") || self.no_ignore()