pub fn emit<T: RenderOutput>(
cli: &Cli,
cfg: Option<&RepoConfig>,
out: &T,
) -> Result<()>Expand description
Resolve the format decision (JSON vs text) and emit accordingly.
Centralises the should_output_json → branch → write idiom from the
existing structure-first verbs. Handlers should construct a typed
output value and call this; never println! directly.