Skip to content

Commit

Permalink
fix: correct order of arguments while gathering files to lint
Browse files Browse the repository at this point in the history
  • Loading branch information
suo committed Apr 15, 2022
1 parent 8d51a11 commit 9c2093d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9c2093d

Please sign in to comment.