MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / git_ok

Function git_ok

atomic-cli/src/commands/git/guard.rs:1306–1319  ·  view source on GitHub ↗
(root: &Path, args: &[&str])

Source from the content-addressed store, hash-verified

1304 }
1305
1306 fn git_ok(root: &Path, args: &[&str]) -> String {
1307 let output = Command::new("git")
1308 .arg("-C")
1309 .arg(root)
1310 .args(args)
1311 .output()
1312 .expect("run Git");
1313 assert!(
1314 output.status.success(),
1315 "git {args:?} failed: {}",
1316 String::from_utf8_lossy(&output.stderr)
1317 );
1318 String::from_utf8_lossy(&output.stdout).trim().to_string()
1319 }
1320
1321 fn initialized_colocated_repository() -> tempfile::TempDir {
1322 let root = tempfile::tempdir().expect("tempdir");

Calls 1

outputMethod · 0.45