Skip to main content

fallow_engine/
git_env.rs

1//! Git process environment helpers owned by the engine boundary.
2
3use std::process::Command;
4
5/// Environment variables that describe an enclosing git operation's repository
6/// state and should not leak into fallow-owned git subprocesses.
7pub const AMBIENT_GIT_ENV_VARS: &[&str] = fallow_core::git_env::AMBIENT_GIT_ENV_VARS;
8
9/// Strip ambient git repository-state environment variables from a `Command`.
10///
11/// Returns the `Command` for fluent chaining alongside `.args()` and
12/// `.current_dir()`.
13pub fn clear_ambient_git_env(cmd: &mut Command) -> &mut Command {
14    fallow_core::git_env::clear_ambient_git_env(cmd)
15}