From 9c2093d4dace6e3570cad9bc5b363e0b3fc50b3c Mon Sep 17 00:00:00 2001 From: Michael Suo Date: Thu, 14 Apr 2022 20:06:01 -0700 Subject: [PATCH] fix: correct order of arguments while gathering files to lint --- src/git.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/git.rs b/src/git.rs index 41ed903..f763b31 100644 --- a/src/git.rs +++ b/src/git.rs @@ -58,11 +58,12 @@ pub fn get_changed_files(git_root: &AbsPath, relative_to: Option<&str>) -> Resul "--no-commit-id", "--name-status", "-r", - "HEAD", ]; if let Some(relative_to) = relative_to { args.push(relative_to); } + args.push("HEAD"); + let output = Command::new("git") .args(&args) .current_dir(git_root)