summaryrefslogtreecommitdiffstats
path: root/packfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'packfile.c')
-rw-r--r--packfile.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/packfile.c b/packfile.c
index 5e8019b1fe..64248ca664 100644
--- a/packfile.c
+++ b/packfile.c
@@ -1496,7 +1496,9 @@ void clear_delta_base_cache(void)
}
static void add_delta_base_cache(struct packed_git *p, off_t base_offset,
- void *base, unsigned long base_size, enum object_type type)
+ void *base, unsigned long base_size,
+ unsigned long delta_base_cache_limit,
+ enum object_type type)
{
struct delta_base_cache_entry *ent;
struct list_head *lru, *tmp;
@@ -1698,6 +1700,8 @@ void *unpack_entry(struct repository *r, struct packed_git *p, off_t obj_offset,
int delta_stack_nr = 0, delta_stack_alloc = UNPACK_ENTRY_STACK_PREALLOC;
int base_from_cache = 0;
+ prepare_repo_settings(p->repo);
+
write_pack_access_log(p, obj_offset);
/* PHASE 1: drill down to the innermost base object */
@@ -1878,7 +1882,9 @@ void *unpack_entry(struct repository *r, struct packed_git *p, off_t obj_offset,
* before we are done using it.
*/
if (!external_base)
- add_delta_base_cache(p, base_obj_offset, base, base_size, type);
+ add_delta_base_cache(p, base_obj_offset, base, base_size,
+ p->repo->settings.delta_base_cache_limit,
+ type);
free(delta_data);
free(external_base);