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

Function git

atomic-cli/tests/it/logging_integration_test.rs:34–46  ·  view source on GitHub ↗
(dir: &Path, args: &[&str])

Source from the content-addressed store, hash-verified

32}
33
34fn git(dir: &Path, args: &[&str]) -> String {
35 let output = Command::new("git")
36 .args(args)
37 .current_dir(dir)
38 .env("GIT_AUTHOR_NAME", "Logging Tests")
39 .env("GIT_AUTHOR_EMAIL", "logging@example.com")
40 .env("GIT_COMMITTER_NAME", "Logging Tests")
41 .env("GIT_COMMITTER_EMAIL", "logging@example.com")
42 .output()
43 .expect("run git");
44 assert!(output.status.success(), "git {args:?}: {output:?}");
45 String::from_utf8(output.stdout).unwrap().trim().to_string()
46}
47
48fn default_log_dir(home: &Path) -> PathBuf {
49 home.join(".atomic").join("logs")

Calls 2

outputMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected