Skip to main content

output

Function output 

Source
pub fn output(args: &[&str]) -> Option<Output>
Expand description

A git command’s full result, for the caller that must tell one kind of failure from another.

stdout collapses every non-zero exit to None and discards stderr, which is the right shape for “cannot tell, do not block”. It is the wrong shape for reading configuration: git config --get exits 1 for a key nobody set and 128 for a key set to something git itself refuses to parse, and those two must not become the same answer — one is a default, the other is a mistake somebody needs to be told about. See config.