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
2026-08-10 15:50:53 +00:00
committed by copyberry
parent 8b1b065719
commit 92cbfb4d24
4 changed files with 9 additions and 9 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ use std::process::Output;
use std::process::Stdio;
use std::time::Duration;
use codex_protocol::shell_environment::scrub_non_inheritable_env_vars;
#[cfg(windows)]
use codex_utils_pty::JobObject;
#[cfg(unix)]
@@ -29,7 +30,7 @@ impl Drop for KillGitProcessTreeOnDrop {
}
fn spawn_git_command(command: &mut Command) -> Option<(Child, KillGitProcessTreeOnDrop)> {
crate::scrub_non_inheritable_environment(command.as_std_mut());
scrub_non_inheritable_env_vars(command.as_std_mut());
#[cfg(unix)]
command.process_group(0);
command.kill_on_drop(true);