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

Function git

atomic-cli/tests/it/git_projection_cb8a_test.rs:59–78  ·  view source on GitHub ↗
(root: &Path, args: &[&str])

Source from the content-addressed store, hash-verified

57}
58
59fn git(root: &Path, args: &[&str]) -> String {
60 let output = Command::new("git")
61 .args(args)
62 .current_dir(root)
63 .env("GIT_AUTHOR_NAME", "CB-8A Tests")
64 .env("GIT_AUTHOR_EMAIL", "cb8a@example.com")
65 .env("GIT_COMMITTER_NAME", "CB-8A Tests")
66 .env("GIT_COMMITTER_EMAIL", "cb8a@example.com")
67 .output()
68 .expect("run git");
69 assert!(
70 output.status.success(),
71 "git {args:?} failed: {}",
72 String::from_utf8_lossy(&output.stderr)
73 );
74 String::from_utf8(output.stdout)
75 .expect("utf8 git output")
76 .trim()
77 .to_string()
78}
79
80#[allow(dead_code)]
81fn git_ok(root: &Path, args: &[&str]) {

Callers 3

git_okFunction · 0.70
gitMethod · 0.70
refsMethod · 0.70

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected