iPartially revert previous patch - dedup - deduplicating backup program Err bitreich.org 70 hgit clone git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ URL:git://bitreich.org/dedup/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/dedup/ bitreich.org 70 1Log /scm/dedup/log.gph bitreich.org 70 1Files /scm/dedup/files.gph bitreich.org 70 1Refs /scm/dedup/refs.gph bitreich.org 70 1Tags /scm/dedup/tag bitreich.org 70 1README /scm/dedup/file/README.gph bitreich.org 70 1LICENSE /scm/dedup/file/LICENSE.gph bitreich.org 70 i--- Err bitreich.org 70 1commit 85170f6b38620fddbf8b08b13a3b293f4db62d3e /scm/dedup/commit/85170f6b38620fddbf8b08b13a3b293f4db62d3e.gph bitreich.org 70 1parent 12641354d5c6d5d5a06b889df69ec71cbbeca176 /scm/dedup/commit/12641354d5c6d5d5a06b889df69ec71cbbeca176.gph bitreich.org 70 hAuthor: sin URL:mailto:sin@2f30.org bitreich.org 70 iDate: Mon, 4 Mar 2019 16:20:49 +0000 Err bitreich.org 70 i Err bitreich.org 70 iPartially revert previous patch Err bitreich.org 70 i Err bitreich.org 70 iAlways checking the cache takes too much time for large repos. Err bitreich.org 70 i Err bitreich.org 70 iDiffstat: Err bitreich.org 70 i M dedup.c | 8 ++++++-- Err bitreich.org 70 i Err bitreich.org 70 i1 file changed, 6 insertions(+), 2 deletions(-) Err bitreich.org 70 i--- Err bitreich.org 70 1diff --git a/dedup.c b/dedup.c /scm/dedup/file/dedup.c.gph bitreich.org 70 i@@ -546,10 +546,14 @@ load_cache(void) Err bitreich.org 70 i uint64_t nr_entries; Err bitreich.org 70 i uint64_t i; Err bitreich.org 70 i Err bitreich.org 70 i- check_cache(); Err bitreich.org 70 i- Err bitreich.org 70 i xlseek(cfd, 0, SEEK_SET); Err bitreich.org 70 i nr_entries = cache_nr_entries(); Err bitreich.org 70 i+ if (nr_entries == 0) { Err bitreich.org 70 i+ xlseek(ifd, SNAP_HDR_SIZE, SEEK_SET); Err bitreich.org 70 i+ walk_snap(reload_cache, NULL); Err bitreich.org 70 i+ return; Err bitreich.org 70 i+ } Err bitreich.org 70 i+ Err bitreich.org 70 i for (i = 0; i < nr_entries; i++) { Err bitreich.org 70 i struct cache_entry cache_entry; Err bitreich.org 70 i Err bitreich.org 70 .