git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Justin Tobler <jltobler@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 03/10] packfile: refactor kept-pack cache to work with packfile stores
Date: Tue, 16 Dec 2025 10:09:14 +0100	[thread overview]
Message-ID: <aUEhusU3iu6TjF16@pks.im> (raw)
In-Reply-To: <6sverdiyw6y4k5yiocp2v7yhogfvfpmajyiujbmfhzd3n3gb72@wni25ru2m236>

On Mon, Dec 15, 2025 at 03:56:25PM -0600, Justin Tobler wrote:
> On 25/12/15 08:36AM, Patrick Steinhardt wrote:
> > diff --git a/packfile.h b/packfile.h
> > index 33cc1c1654..701a3b4946 100644
> > --- a/packfile.h
> > +++ b/packfile.h
> > @@ -210,6 +210,19 @@ struct packed_git *packfile_store_load_pack(struct packfile_store *store,
> >  int packfile_store_freshen_object(struct packfile_store *store,
> >  				  const struct object_id *oid);
> >  
> > +enum kept_pack_type {
> > +	KEPT_PACK_ON_DISK = (1 << 0),
> > +	KEPT_PACK_IN_CORE = (1 << 1),
> > +};
> 
> Looks like while we are here we are renaming some existing flags and
> storing them in an enum instead. Makes sense, but maybe we should also
> explicitly mention this in the commit message since much of the fallout
> in the diff relates to this change.

Fair, will add to the message.

> > +
> > +/*
> > + * Retrieve the cache of kept packs from the given packfile store. Accepts a
> > + * combination of `kept_pack_type` flags. The cache is computed on demand and
> > + * will be recomputed whenever the flags change.
> > + */
> > +struct packed_git **packfile_store_get_kept_pack_cache(struct packfile_store *store,
> > +						       unsigned flags);
> 
> Now the kept cache is accessed through the packfile store instead of the
> repository. Make sense.
> 
> Since we are also changing the name from `kept_pack_cache()`, there are
> some comments in "packfile.h" that are now outdated. We may want to
> update them here.

Ah, indeed, thanks for catching! I've made the changes locally, but will
hold off sending them until I've got more feedback.

Patrick

  reply	other threads:[~2025-12-16  9:09 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-15  7:36 [PATCH 00/10] Start tracking packfiles per object database source Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 01/10] packfile: create store via its owning source Patrick Steinhardt
2025-12-15 21:30   ` Justin Tobler
2025-12-16  8:36     ` Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 02/10] packfile: pass source to `prepare_pack()` Patrick Steinhardt
2025-12-15 21:38   ` Justin Tobler
2025-12-15  7:36 ` [PATCH 03/10] packfile: refactor kept-pack cache to work with packfile stores Patrick Steinhardt
2025-12-15 21:56   ` Justin Tobler
2025-12-16  9:09     ` Patrick Steinhardt [this message]
2025-12-15  7:36 ` [PATCH 04/10] packfile: refactor misleading code when unusing pack windows Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 05/10] packfile: move packfile store into object source Patrick Steinhardt
2025-12-18  0:52   ` Justin Tobler
2025-12-18  6:50     ` Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 06/10] packfile: only prepare owning store in `packfile_store_get_packs()` Patrick Steinhardt
2025-12-18  0:58   ` Justin Tobler
2025-12-15  7:36 ` [PATCH 07/10] packfile: only prepare owning store in `packfile_store_prepare()` Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 08/10] packfile: inline `find_kept_pack_entry()` Patrick Steinhardt
2025-12-18  1:06   ` Justin Tobler
2025-12-18  6:48     ` Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 09/10] packfile: refactor `find_pack_entry()` to work on the packfile store Patrick Steinhardt
2025-12-15  7:36 ` [PATCH 10/10] packfile: move MIDX into " Patrick Steinhardt
2025-12-18  6:55 ` [PATCH v2 00/10] Start tracking packfiles per object database source Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 01/10] packfile: create store via its owning source Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 02/10] packfile: pass source to `prepare_pack()` Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 03/10] packfile: refactor kept-pack cache to work with packfile stores Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 04/10] packfile: refactor misleading code when unusing pack windows Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 05/10] packfile: move packfile store into object source Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 06/10] packfile: only prepare owning store in `packfile_store_get_packs()` Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 07/10] packfile: only prepare owning store in `packfile_store_prepare()` Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 08/10] packfile: inline `find_kept_pack_entry()` Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 09/10] packfile: refactor `find_pack_entry()` to work on the packfile store Patrick Steinhardt
2025-12-18  6:55   ` [PATCH v2 10/10] packfile: move MIDX into " Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aUEhusU3iu6TjF16@pks.im \
    --to=ps@pks.im \
    --cc=git@vger.kernel.org \
    --cc=jltobler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).