git-utils: centralize repository authority and trusted Git launch

This commit is contained in:
Chris Bookholt
2026-07-01 21:19:17 -07:00
parent 9a21b607e3
commit bcf026cbca
21 changed files with 4820 additions and 389 deletions
+3 -4
View File
@@ -63,14 +63,13 @@ fn git_apply_numstat_paths(
patch_path: &Path,
revert: bool,
) -> io::Result<Vec<String>> {
let mut cmd = git.command();
let command_cwd = patch_path.parent().unwrap_or_else(|| Path::new("."));
let mut cmd = git.command_for_cwd(command_cwd)?;
cmd.args(["apply", "--numstat", "-z"]);
if revert {
cmd.arg("-R");
}
cmd.arg("--")
.arg(patch_path)
.current_dir(patch_path.parent().unwrap_or_else(|| Path::new(".")));
cmd.arg("--").arg(patch_path);
let out = git.output(cmd)?;
if !out.status.success() {
return Err(io::Error::new(