Skip to main content

clear_ambient_git_env

Function clear_ambient_git_env 

Source
pub fn clear_ambient_git_env(cmd: &mut Command) -> &mut Command
Expand description

Strip ambient git repository-state environment variables from a Command.

Apply to every git subprocess fallow spawns from production code. The strip is unconditional and idempotent: Command::env_remove is a no-op when the variable is not present in the inherited environment.

Returns the Command for fluent chaining alongside .args(), .current_dir(), and so on.