MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / git_output

Function git_output

crates/opencode-cli/src/main.rs:4834–4844  ·  view source on GitHub ↗
(args: &[&str])

Source from the content-addressed store, hash-verified

4832}
4833
4834fn git_output(args: &[&str]) -> anyhow::Result<String> {
4835 let output = ProcessCommand::new("git")
4836 .args(args)
4837 .output()
4838 .map_err(|e| anyhow::anyhow!("Failed to run git {:?}: {}", args, e))?;
4839 if !output.status.success() {
4840 let stderr = String::from_utf8_lossy(&output.stderr).trim().to_string();
4841 anyhow::bail!("git {:?} failed: {}", args, stderr);
4842 }
4843 Ok(String::from_utf8_lossy(&output.stdout).trim().to_string())
4844}
4845
4846fn gh_run(args: &[&str], token: Option<&str>) -> anyhow::Result<()> {
4847 let mut cmd = ProcessCommand::new("gh");

Callers 2

github_detect_dirtyFunction · 0.70
handle_github_commandFunction · 0.70

Calls 3

newFunction · 0.85
outputMethod · 0.80
successMethod · 0.45

Tested by

no test coverage detected