aboutsummaryrefslogtreecommitdiff
path: root/reachable.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2026-01-09 09:33:11 +0100
committerJunio C Hamano <gitster@pobox.com>2026-01-09 06:40:06 -0800
commit085de91b951a40b2b8ce35f8bfa182d4f5bcea6b (patch)
tree75d93a0d14d0ecd56a203843dfb17267801cfa8a /reachable.c
parent0316c63ca4fc0d58ecd02243c62253b246fd046a (diff)
downloadgit-085de91b951a40b2b8ce35f8bfa182d4f5bcea6b.tar.xz
packfile: refactor kept-pack cache to work with packfile stores
The kept pack cache is a cache of packfiles that are marked as kept either via an accompanying ".kept" file or via an in-memory flag. The cache can be retrieved via `kept_pack_cache()`, where one needs to pass in a repository. Ultimately though the kept-pack cache is a property of the packfile store, and this causes problems in a subsequent commit where we want to move down the packfile store to be a per-object-source entity. Prepare for this and refactor the kept-pack cache to work on top of a packfile store instead. While at it, rename both the function and flags specific to the kept-pack cache so that they can be properly attributed to the respective subsystems. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reachable.c')
-rw-r--r--reachable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/reachable.c b/reachable.c
index b753c39553..4b532039d5 100644
--- a/reachable.c
+++ b/reachable.c
@@ -242,7 +242,7 @@ static int want_recent_object(struct recent_data *data,
const struct object_id *oid)
{
if (data->ignore_in_core_kept_packs &&
- has_object_kept_pack(data->revs->repo, oid, IN_CORE_KEEP_PACKS))
+ has_object_kept_pack(data->revs->repo, oid, KEPT_PACK_IN_CORE))
return 0;
return 1;
}