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

Function initialized_repository

atomic-repository/src/wip.rs:704–714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

702 }
703
704 fn initialized_repository() -> tempfile::TempDir {
705 let root = tempfile::tempdir().expect("tempdir");
706 git_ok(root.path(), &["init", "-q"]);
707 git_ok(root.path(), &["symbolic-ref", "HEAD", "refs/heads/main"]);
708 git_ok(root.path(), &["config", "user.name", "Atomic Test"]);
709 git_ok(root.path(), &["config", "user.email", "atomic@example.com"]);
710 fs::write(root.path().join("tracked.txt"), b"one\n").expect("write tracked");
711 git_ok(root.path(), &["add", "tracked.txt"]);
712 git_ok(root.path(), &["commit", "-q", "-m", "initial"]);
713 root
714 }
715
716 #[test]
717 fn capture_or_reuse_returns_identical_recovery_on_retry() {

Calls 3

git_okFunction · 0.70
writeFunction · 0.50
pathMethod · 0.45