Use the shared environment scrubber in git-utils (#37843)

Call `scrub_non_inheritable_env_vars` directly from each Git command path and
remove the redundant crate-local forwarding helper.

GitOrigin-RevId: 9e4125dc538ea888626bde3cb3646a90712206a2
This commit is contained in:
cooper-oai authored and copyberry committed 2026-08-10 15:50:53 +00:00
1 parent 8b1b065719
commit 92cbfb4d24
4 files changed
+9 -9

No files matched your search

+3 -1
View File
@@ -4,6 +4,8 @@ use std::path::Path;
use std::path::PathBuf;
use std::process::Command;
use codex_protocol::shell_environment::scrub_non_inheritable_env_vars;
use crate::GitToolingError;
const DISABLED_HOOKS_PATH: &str = if cfg!(windows) { "NUL" } else { "/dev/null" };
@@ -120,7 +122,7 @@ where
}
}
command.args(&args_vec);
crate::scrub_non_inheritable_environment(&mut command);
scrub_non_inheritable_env_vars(&mut command);
let output = command.output()?;
if !output.status.success() {
let stderr = String::from_utf8_lossy(&output.stderr).trim().to_string();