pub fn git_cmd_safe(
url: Option<&str>,
ssh_policy: Option<SshHostKeyPolicy>,
) -> CommandExpand description
Prepare a git CLI command with SSH hang protection.
Sets GIT_TERMINAL_PROMPT=0 to prevent interactive prompts and, for SSH URLs,
sets GIT_SSH_COMMAND with BatchMode=yes and configurable StrictHostKeyChecking
to prevent hangs in non-interactive contexts (piped install scripts, daemons).
The ssh_policy parameter controls the StrictHostKeyChecking value:
Noneuses the default (accept-new)Some(policy)uses the specified policy