Skip to content
This repository was archived by the owner on Jan 18, 2025. It is now read-only.

Commit 6db9928

Browse files
committed
Fix #68: also ignore .git etc folder
Instead of just the files/folders *within*. Fix provided by mattgreen: watchexec/watchexec@6ebb7bc
1 parent 893be9e commit 6db9928

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ fn get_ignores(debug: bool, matches: &ArgMatches) -> (bool, Vec<String>) {
7878
opts.push(format!("*{}.DS_Store", MAIN_SEPARATOR));
7979
opts.push("*.swp".into());
8080

81-
opts.push(format!("*{s}.hg{s}*", s=MAIN_SEPARATOR));
82-
opts.push(format!("*{s}.git{s}*", s=MAIN_SEPARATOR));
83-
opts.push(format!("*{s}.svn{s}*", s=MAIN_SEPARATOR));
81+
opts.push(format!("*{s}.hg{s}**", s=MAIN_SEPARATOR));
82+
opts.push(format!("*{s}.git{s}**", s=MAIN_SEPARATOR));
83+
opts.push(format!("*{s}.svn{s}**", s=MAIN_SEPARATOR));
8484

85-
opts.push(format!("*{s}target{s}*", s=MAIN_SEPARATOR));
85+
opts.push(format!("*{s}target{s}**", s=MAIN_SEPARATOR));
8686

8787
if debug {
8888
println!(">>> Default ignores: {:?}", opts);

0 commit comments

Comments
 (0)