pub fn ssh_batch_mode(
hiding: bool,
invocation: &Invocation,
configured: impl FnOnce() -> Option<bool>,
) -> Option<(OsString, OsString)>Expand description
GIT_SSH_COMMAND=SSH_BATCH_COMMAND for a git started without a
console window (hiding): ssh then fails at once (“Host key
verification failed.”, “Permission denied (publickey).”) where it
would ask for a passphrase or a new host key on a console nobody sees.
Keys in ssh-agent still work. None when hiding is off, the program
is not git, or the user chose an ssh command of their own
(GIT_SSH_COMMAND or GIT_SSH in the environment, core.sshCommand in
the arguments, or configured() saying git’s config sets it; an
unknown answer counts as set). configured runs only when needed.