Skip to content

Commit eefe97e

Browse files
Arijit Banerjeegitster
authored andcommitted
index-pack: retain child bases in delta cache
When resolving a delta whose result has children of its own, index-pack adds the result to work_head, accounts its data in base_cache_used, and calls prune_base_data(). It then immediately frees that same data. This bypasses the existing delta base cache policy and can force later descendants to reconstruct the queued base again. Let the existing delta_base_cache_limit pruning policy decide whether to keep or evict the data instead. Signed-off-by: Arijit Banerjee <arijit@effectiveailabs.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent c69baaf commit eefe97e

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

builtin/index-pack.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,6 @@ static void *threaded_second_pass(void *data)
12121212
list_add(&child->list, &work_head);
12131213
base_cache_used += child->size;
12141214
prune_base_data(NULL);
1215-
free_base_data(child);
12161215
} else if (child) {
12171216
/*
12181217
* This child does not have its own children. It may be

0 commit comments

Comments
 (0)