Skip to main content

differs

Function differs 

Source
fn differs(src: &Path, dest: &Path) -> Result<Option<String>>
Expand description

Why two copies of one block name are not the same block, or None.

Names and sizes, not content. A block is sealed and immutable, its files are written once and the store’s copy came from copy_files — so a byte that differs under a name and a length that both match has no writer in this design. Reading both sides to compare them would put the block’s whole size through the retention sweep once a minute for every block already in the store, to rule out a case nothing can produce.

The same is_file filter as copy_files, which walks past directories: a stray one beside the tables is not part of the block and was never copied, so counting it would report a mismatch against the store’s faithful copy of it.