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

Function git

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

Source from the content-addressed store, hash-verified

59}
60
61fn git(root: &Path, args: &[&str]) -> String {
62 let output = Command::new("git")
63 .args(args)
64 .current_dir(root)
65 .env("GIT_AUTHOR_NAME", "Bypass Cycle Tests")
66 .env("GIT_AUTHOR_EMAIL", "bypass-cycle@example.com")
67 .env("GIT_COMMITTER_NAME", "Bypass Cycle Tests")
68 .env("GIT_COMMITTER_EMAIL", "bypass-cycle@example.com")
69 .output()
70 .expect("run git");
71 assert!(
72 output.status.success(),
73 "git {args:?} failed: {}",
74 String::from_utf8_lossy(&output.stderr)
75 );
76 String::from_utf8(output.stdout)
77 .expect("utf8 git output")
78 .trim()
79 .to_string()
80}
81
82/// Build the four-state Git repository that reproduces the bypass-cycle
83/// byte loss: base file, prepend a section with a blank separator, insert

Callers 1

fixtureFunction · 0.70

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected