MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / git_output

Function git_output

src/worktree.rs:184–192  ·  view source on GitHub ↗
(dir: &Path, args: &[&str])

Source from the content-addressed store, hash-verified

182}
183
184fn git_output(dir: &Path, args: &[&str]) -> Option<String> {
185 let output = git_command().args(args).current_dir(dir).output().ok()?;
186 if !output.status.success() {
187 return None;
188 }
189 let raw = String::from_utf8(output.stdout).ok()?;
190 let trimmed = raw.trim();
191 (!trimmed.is_empty()).then(|| trimmed.to_string())
192}
193
194#[cfg(test)]
195#[allow(clippy::unwrap_used, clippy::expect_used)]

Callers 2

git_worktree_rootFunction · 0.70
git_common_dirFunction · 0.70

Calls 4

git_commandFunction · 0.85
outputMethod · 0.80
successMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected