Function unhit [src]
Reset self.hash.hasher to the state it should be in after hit returns false.
The hasher contains the original input digest, and all original input file digests (i.e.
not including post files).
Assumes that bin_digest is populated for all files up to input_file_count. As such,
this is not necessarily safe to call within hit.
Prototype
pub fn unhit(self: *Manifest, bin_digest: BinDigest, input_file_count: usize) void Parameters
self: *Manifestbin_digest: BinDigestinput_file_count: usize Source
pub fn unhit(self: *Manifest, bin_digest: BinDigest, input_file_count: usize) void {
// Reset the hash.
self.hash.hasher = hasher_init;
self.hash.hasher.update(&bin_digest);
// Remove files not in the initial hash.
while (self.files.count() != input_file_count) {
var file = self.files.pop().?;
file.key.deinit(self.cache.gpa);
}
for (self.files.keys()) |file| {
self.hash.hasher.update(&file.bin_digest);
}
}