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

Function git

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

Source from the content-addressed store, hash-verified

47}
48
49fn git(root: &Path, args: &[&str]) -> String {
50 let output = Command::new("git")
51 .args(args)
52 .current_dir(root)
53 .env("GIT_AUTHOR_NAME", "Branch Reconcile Tests")
54 .env("GIT_AUTHOR_EMAIL", "branch-reconcile@example.com")
55 .env("GIT_COMMITTER_NAME", "Branch Reconcile Tests")
56 .env("GIT_COMMITTER_EMAIL", "branch-reconcile@example.com")
57 .output()
58 .expect("run git");
59 assert!(
60 output.status.success(),
61 "git {args:?} failed: {}",
62 String::from_utf8_lossy(&output.stderr)
63 );
64 String::from_utf8(output.stdout)
65 .expect("utf8 git output")
66 .trim()
67 .to_string()
68}
69
70/// A Git repository with one baseline commit, imported and shim-enabled.
71fn shim_repo() -> (PathBuf, PathBuf) {

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected