Skip to main content

Module git_cmd

Module git_cmd 

Source
Expand description

Hardened git subprocess construction and bounded execution.

Every git invocation that can touch a remote must be built here. A bare Command::new("git") inherits the controlling terminal, so an unreachable or permission-denied remote lets ssh or a credential helper write its prompt straight into the alternate screen — corrupting the TUI — or block forever on /dev/tty with no way for the user to cancel.

git_command removes that class of failure by disabling every interactive prompt path, and run_git_with_timeout guarantees the child is reaped even when the remote simply never answers.

Enums§

GitRunError
Why a bounded git run did not produce a normal exit status.

Functions§

git_command
Builds a git command that can never block on an interactive prompt.
run_git_with_timeout
Runs cmd to completion, killing it if it exceeds timeout.