dedup

data deduplication program
git clone git://git.2f30.org/dedup.git
Log | Files | Refs | README | LICENSE

commit 85170f6b38620fddbf8b08b13a3b293f4db62d3e
parent 12641354d5c6d5d5a06b889df69ec71cbbeca176
Author: sin <sin@2f30.org>
Date:   Mon,  4 Mar 2019 16:20:49 +0000

Partially revert previous patch

Always checking the cache takes too much time for large repos.

Diffstat:
Mdedup.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dedup.c b/dedup.c @@ -546,10 +546,14 @@ load_cache(void) uint64_t nr_entries; uint64_t i; - check_cache(); - xlseek(cfd, 0, SEEK_SET); nr_entries = cache_nr_entries(); + if (nr_entries == 0) { + xlseek(ifd, SNAP_HDR_SIZE, SEEK_SET); + walk_snap(reload_cache, NULL); + return; + } + for (i = 0; i < nr_entries; i++) { struct cache_entry cache_entry;