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

Function git

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

Source from the content-addressed store, hash-verified

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

Callers 2

commit_atFunction · 0.70
fixtureFunction · 0.70

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected