Skip to main content

run_git

Function run_git 

Source
pub fn run_git(cwd: &Path, args: &[&str]) -> Result<String>
Expand description

Run git <args…> in cwd and return stdout as a String.

Stderr is captured and surfaced as part of the error so the slash command can ctx.reply(Error, ...) with the real reason. Non-zero exit codes are always an error — callers that want to treat empty output as success must inspect the returned Ok(String) themselves (see diff_head).