From cafb1700beaffaeb52c606d8962ad3ba870634f6 Mon Sep 17 00:00:00 2001 From: Arijit Banerjee Date: Thu, 28 May 2026 14:59:28 -0700 Subject: [PATCH] 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 --- builtin/index-pack.c | 1 - 1 file changed, 1 deletion(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index cf0bd8280dca83..027c64b522ebb2 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1212,7 +1212,6 @@ static void *threaded_second_pass(void *data) list_add(&child->list, &work_head); base_cache_used += child->size; prune_base_data(NULL); - free_base_data(child); } else if (child) { /* * This child does not have its own children. It may be