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

Function git

atomic-repository/src/repository/tests/synthesis_tests.rs:139–156  ·  view source on GitHub ↗
(root: &Path, args: &[&str])

Source from the content-addressed store, hash-verified

137}
138
139fn git(root: &Path, args: &[&str]) -> String {
140 let output = Command::new("git")
141 .args(args)
142 .current_dir(root)
143 .env("GIT_AUTHOR_NAME", "Atomic Tests")
144 .env("GIT_AUTHOR_EMAIL", "tests@atomic.dev")
145 .env("GIT_COMMITTER_NAME", "Atomic Tests")
146 .env("GIT_COMMITTER_EMAIL", "tests@atomic.dev")
147 .output()
148 .unwrap();
149 assert!(
150 output.status.success(),
151 "git {:?} failed: {}",
152 args,
153 String::from_utf8_lossy(&output.stderr)
154 );
155 String::from_utf8(output.stdout).unwrap().trim().to_string()
156}
157
158/// A complete staged tree expectation (review F3): every entry of the
159/// commit's verified Git tree — inherited paths included — with exact

Calls 2

unwrapMethod · 0.45
outputMethod · 0.45

Tested by

no test coverage detected