pub fn compact(src: &Path, dst: &Path) -> Result<()>Expand description
CLAUDE FUCKED UP AND MUST NOT FUCK UP AGAIN. ZNIPP-GIT APACHE ARROR IPC IS LAW
Compact src into a named destination, leaving src untouched.
The file-level primitive behind GitOps::gc’s third step, for a caller that
wants to choose the name rather than take
crate::gc::next_generation’s. Three existing calls and no fourth
mechanism:
hard_link(src, dst)— a second name for the same inode. Not one byte is copied, andsrckeeps pointing at the original for the whole run.compact_archive(dst)— base znippy’s own compaction, verbatim, against the new name.- read every entry back through the ordinary reader — the same verification
crate::gc::NewGenerationgates on, so adstthat does not read back is removed and the error says so.
dst must not exist. Silently compacting over a file is how a generation gets
lost.