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

Method new

atomic-cli/tests/it/git_shim_cb13d_test.rs:227–256  ·  view source on GitHub ↗
(name: &str)

Source from the content-addressed store, hash-verified

225
226impl WatchFixture {
227 fn new(name: &str) -> Self {
228 let root = TempDir::new().expect("repo tempdir");
229 let home = TempDir::new().expect("home tempdir");
230 assert!(git(root.path(), &["init", "-q", "-b", "main"])
231 .status
232 .success());
233 fs::write(root.path().join("tracked.txt"), b"anchor me\n").expect("write file");
234 assert!(git(root.path(), &["add", "tracked.txt"]).status.success());
235 assert!(git(root.path(), &["commit", "-qm", "anchor base"])
236 .status
237 .success());
238 atomic_ok(root.path(), home.path(), &["init", "--no-vault"]);
239 fs::remove_file(root.path().join(".atomicignore")).expect("remove atomicignore");
240 atomic_ok(root.path(), home.path(), &["git", "import", "--no-vault"]);
241 atomic_ok(
242 root.path(),
243 home.path(),
244 &[
245 "git",
246 "shim",
247 "enable",
248 "--binding-key-file",
249 key_file(home.path()).to_str().expect("utf8 key path"),
250 ],
251 );
252 atomic_ok(root.path(), home.path(), &["git", "shim", "reconcile"]);
253 enable_watch(root.path());
254 let _ = name;
255 Self { root, home }
256 }
257
258 fn root(&self) -> &Path {
259 self.root.path()

Callers

nothing calls this directly

Calls 5

writeFunction · 0.70
atomic_okFunction · 0.70
key_fileFunction · 0.70
enable_watchFunction · 0.70
pathMethod · 0.45

Tested by

no test coverage detected