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

Function git

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

Source from the content-addressed store, hash-verified

130}
131
132fn git(root: &Path, args: &[&str]) -> String {
133 let output = Command::new("git")
134 .args(args)
135 .current_dir(root)
136 .env("GIT_AUTHOR_NAME", "Daily Workflow Tests")
137 .env("GIT_AUTHOR_EMAIL", "daily@example.com")
138 .env("GIT_COMMITTER_NAME", "Daily Workflow Tests")
139 .env("GIT_COMMITTER_EMAIL", "daily@example.com")
140 .output()
141 .expect("run git");
142 assert!(
143 output.status.success(),
144 "git {args:?} failed: {}",
145 String::from_utf8_lossy(&output.stderr)
146 );
147 String::from_utf8(output.stdout)
148 .expect("utf8 git output")
149 .trim()
150 .to_string()
151}
152
153/// `git` with the hook environment pinned to the test home.
154fn git_with_home(root: &Path, home: &Path, args: &[&str]) -> Output {

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected