From f9a3cade268b873d94c7a02a6d996014a4b34c0b Mon Sep 17 00:00:00 2001 From: Matt Green Date: Thu, 27 Apr 2017 15:20:44 -0400 Subject: [PATCH] Add common VCS dirs to default ignore list (fixes #54) --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/cli.rs | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14d143d..ebc52bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ [root] name = "watchexec" -version = "1.8.1" +version = "1.8.2" dependencies = [ "clap 2.22.2 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 3327c5c..0329ded 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "watchexec" -version = "1.8.1" +version = "1.8.2" authors = ["Matt Green "] description = "Executes commands in response to file modifications" documentation = "https://github.com/mattgreen/watchexec" diff --git a/src/cli.rs b/src/cli.rs index 853ac92..80ff3f3 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -140,7 +140,10 @@ pub fn get_args() -> Args { let mut ignores = vec![]; let default_ignores = vec![format!("*{}.DS_Store", MAIN_SEPARATOR), String::from("*.pyc"), - String::from("*.swp")]; + String::from("*.swp"), + String::from("*/.git/*"), + String::from("*/.hg/*"), + String::from("*/.svn/*")]; if args.occurrences_of("no-default-ignore") == 0 {