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

Function git_env

atomic-cli/tests/it/git_import_cb9b_test.rs:779–795  ·  view source on GitHub ↗
(root: &Path, env: &[(&str, &str)], args: &[&str])

Source from the content-addressed store, hash-verified

777}
778
779fn git_env(root: &Path, env: &[(&str, &str)], args: &[&str]) {
780 let output = Command::new("git")
781 .args(args)
782 .current_dir(root)
783 .envs(env.iter().copied())
784 .env("GIT_AUTHOR_NAME", "CB-9B Tests")
785 .env("GIT_AUTHOR_EMAIL", "cb9b@example.com")
786 .env("GIT_COMMITTER_NAME", "CB-9B Tests")
787 .env("GIT_COMMITTER_EMAIL", "cb9b@example.com")
788 .output()
789 .expect("run git");
790 assert!(
791 output.status.success(),
792 "git {args:?} failed: {}",
793 String::from_utf8_lossy(&output.stderr)
794 );
795}
796
797/// Unbound squashes without trailers synthesize one `Derivation::Squash`
798/// interpretation; `atomic git shim review` surfaces candidates with the

Calls 2

outputMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected