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

Function git

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

Source from the content-addressed store, hash-verified

62}
63
64fn git(root: &Path, args: &[&str]) -> String {
65 let output = Command::new("git")
66 .args(args)
67 .current_dir(root)
68 .env("GIT_AUTHOR_NAME", "CB-7B Tests")
69 .env("GIT_AUTHOR_EMAIL", "cb7b@example.com")
70 .env("GIT_COMMITTER_NAME", "CB-7B Tests")
71 .env("GIT_COMMITTER_EMAIL", "cb7b@example.com")
72 .output()
73 .expect("run git");
74 assert!(
75 output.status.success(),
76 "git {args:?} failed: {}",
77 String::from_utf8_lossy(&output.stderr)
78 );
79 String::from_utf8(output.stdout)
80 .expect("utf8 git output")
81 .trim()
82 .to_string()
83}
84
85fn git_ok(root: &Path, args: &[&str]) {
86 let _ = git(root, args);

Callers 7

git_okFunction · 0.70
c0Method · 0.70
headMethod · 0.70
wip_refsMethod · 0.70
wip_ref_valuesMethod · 0.70

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected