(path: &Path)
| 191 | /// bytes plus the byte length (empty digest when absent). |
| 192 | #[allow(dead_code)] |
| 193 | fn digest_file(path: &Path) -> String { |
| 194 | let bytes = fs::read(path).unwrap_or_default(); |
| 195 | let mut hash: u64 = 0xcbf29ce484222325; |
| 196 | for byte in &bytes { |
| 197 | hash ^= *byte as u64; |
| 198 | hash = hash.wrapping_mul(0x100000001b3); |
| 199 | } |
| 200 | format!("{hash:016x}-{}", bytes.len()) |
| 201 | } |
| 202 | |
| 203 | /// Digest of every populated shelf workspace under the common |
| 204 | /// `.atomic/working-copies` tree, including file names and bytes. Empty when |
no test coverage detected