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

Function disable_shadow_sync

atomic-cli/tests/it/git_shim_cb10a_test.rs:221–233  ·  view source on GitHub ↗
(root: &Path)

Source from the content-addressed store, hash-verified

219}
220
221fn disable_shadow_sync(root: &Path) {
222 // Shadow sync is keyed on the managed /.atomic/ exclude line; removing it
223 // makes record a durable-only transition so reconcile's Atomic→Git
224 // export path is exercised under its expected-old lease.
225 let exclude = root.join(".git/info/exclude");
226 let content = fs::read_to_string(&exclude).expect("read exclude");
227 let filtered: String = content
228 .lines()
229 .filter(|line| line.trim() != "/.atomic/")
230 .map(|line| format!("{line}\n"))
231 .collect();
232 fs::write(exclude, filtered).expect("write exclude");
233}
234
235// ---------------------------------------------------------------------------
236// Three-way matrix (RFC §8.5)

Calls 3

writeFunction · 0.70
collectMethod · 0.45
linesMethod · 0.45

Tested by

no test coverage detected