Commit 8688195
Fix prehash cache bypass causing full hash scan on all files in second scan
Cached prehash entries were appended to pre_checked_map unconditionally,
skipping the collision filter that freshly-computed entries go through.
On a second scan where all files are cached, every file was forwarded to
full hashing regardless of prehash result.
Also fixed a latent bug where a cached file and a freshly-computed file
sharing the same prehash were never detected as a collision, since each
loop only checked within its own set. Both loops are now replaced with a
single merge-then-filter pass over a combined (size -> hash -> files) map.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 8aa765f commit 8688195
1 file changed
+23
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
| 477 | + | |
| 478 | + | |
484 | 479 | | |
485 | 480 | | |
486 | 481 | | |
487 | | - | |
488 | | - | |
489 | | - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
490 | 503 | | |
491 | 504 | | |
492 | 505 | | |
| |||
0 commit comments