pub fn git_command() -> CommandExpand description
Builds a git command that can neither prompt nor print on the terminal.
GIT_TERMINAL_PROMPT=0stops git asking for a username/password on the tty.GIT_SSH_COMMANDpins host-key handling so ssh never asks to confirm a fingerprint (seessh_command_val).GIT_ASKPASS/SSH_ASKPASSare neutralised so no GUI or console credential helper can be spawned behind the alternate screen.- The protocol allowlist blocks
ext::-style transports from a hostile.gitmodulesor remote URL. - stdin is
/dev/null, stdout and stderr are pipes. A caller that only reads stdout must drain stderr too (seespawn_pipe_reader), or useoutput()/wait_with_output()which drain both.