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

Function git

atomic-cli/src/commands/git/linked_worktree.rs:181–196  ·  view source on GitHub ↗
(root: &Path, args: &[&str])

Source from the content-addressed store, hash-verified

179 use tempfile::TempDir;
180
181 fn git(root: &Path, args: &[&str]) {
182 let output = Command::new("git")
183 .args(args)
184 .current_dir(root)
185 .env("GIT_AUTHOR_NAME", "Linked Worktree Tests")
186 .env("GIT_AUTHOR_EMAIL", "linked@example.com")
187 .env("GIT_COMMITTER_NAME", "Linked Worktree Tests")
188 .env("GIT_COMMITTER_EMAIL", "linked@example.com")
189 .output()
190 .expect("run git");
191 assert!(
192 output.status.success(),
193 "git {args:?} failed: {}",
194 String::from_utf8_lossy(&output.stderr)
195 );
196 }
197
198 /// A committed main worktree plus one linked worktree on its own branch.
199 fn repository_with_linked_worktree() -> (TempDir, TempDir) {

Callers 1

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected