From e8bc2bf966d1d4999e7fdb3d683c768a54dbfdb6 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Wed, 8 Nov 2017 18:17:12 +1300 Subject: [PATCH] Tweak the uncommitted file rules for git-fmt --- src/bin/git-fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/git-fmt.rs b/src/bin/git-fmt.rs index aa54c3b5718..984134d64de 100644 --- a/src/bin/git-fmt.rs +++ b/src/bin/git-fmt.rs @@ -97,7 +97,7 @@ fn uncommitted_files() -> Vec { cmd.arg("--exclude-standard"); let output = cmd.output().expect("Couldn't execute Git"); let stdout = String::from_utf8_lossy(&output.stdout); - stdout.lines().map(|s| s.to_owned()).collect() + stdout.lines().filter(|s| s.ends_with(".rs")).map(|s| s.to_owned()).collect() } fn check_uncommitted() {