pub fn unhit(self: *Manifest, bin_digest: BinDigest, input_file_count: usize) void 831
832
833
834
835
836
837
838
839
840
841
842
843
844
845 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);
}
}
Reset
self.hash.hasherto the state it should be in afterhitreturnsfalse. The hasher contains the original input digest, and all original input file digests (i.e. not including post files). Assumes thatbin_digestis populated for all files up toinput_file_count. As such, this is not necessarily safe to call withinhit.