public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Toon Claes <toon@iotcl•com>
To: Patrick Steinhardt <ps@pks•im>, git@vger•kernel.org
Cc: Justin Tobler <jltobler@gmail•com>
Subject: Re: [PATCH v2 07/10] packfile: only prepare owning store in `packfile_store_prepare()`
Date: Wed, 07 Jan 2026 14:15:54 +0100	[thread overview]
Message-ID: <877bttpnqt.fsf@iotcl.com> (raw)
In-Reply-To: <20251218-b4-pks-pack-store-via-source-v2-7-62849007ce21@pks.im>

Patrick Steinhardt <ps@pks•im> writes:

> When calling `packfile_store_prepare()` we prepare not only the provided
> packfile store, but also all those of all other sources part of the same
> object database. This was required when the store was still sitting on
> the object database level. But now that it sits on the source level it's
> not anymore.
>
> Refactor the code so that we only prepare the single packfile store
> passed by the caller. Adapt callers accordingly.
>
> Signed-off-by: Patrick Steinhardt <ps@pks•im>
> ---
>  builtin/grep.c | 14 ++++++++------
>  packfile.c     | 19 +++++--------------
>  2 files changed, 13 insertions(+), 20 deletions(-)
>
> diff --git a/builtin/grep.c b/builtin/grep.c
> index 4855b871dd..5b8b87b1ac 100644
> --- a/builtin/grep.c
> +++ b/builtin/grep.c
> @@ -1213,12 +1213,14 @@ int cmd_grep(int argc,
>  		 */
>  		if (recurse_submodules)
>  			repo_read_gitmodules(the_repository, 1);
> -		/*
> -		 * Note: `packfile_store_prepare()` prepares stores from all
> -		 * sources. This will be fixed in a subsequent commit.
> -		 */
> -		if (startup_info->have_repository)
> -			packfile_store_prepare(the_repository->objects->sources->packfiles);
> +
> +		if (startup_info->have_repository) {
> +			struct odb_source *source;
> +
> +			odb_prepare_alternates(the_repository->objects);
> +			for (source = the_repository->objects->sources; source; source = source->next)
> +				packfile_store_prepare(source->packfiles);
> +		}

Ahha, I see what you mean in the previous commit now. Sorry, my mistake.

-- 
Cheers,
Toon

  reply	other threads:[~2026-01-07 13:16 UTC|newest]

Thread overview: 52+ 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
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
2026-01-06 20:42     ` Toon Claes
2025-12-18  6:55   ` [PATCH v2 04/10] packfile: refactor misleading code when unusing pack windows Patrick Steinhardt
2026-01-07 10:13     ` Toon Claes
2025-12-18  6:55   ` [PATCH v2 05/10] packfile: move packfile store into object source Patrick Steinhardt
2026-01-07 13:11     ` Toon Claes
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
2026-01-07 13:15     ` Toon Claes [this message]
2025-12-18  6:55   ` [PATCH v2 08/10] packfile: inline `find_kept_pack_entry()` Patrick Steinhardt
2026-01-08  7:16     ` Kristoffer Haugsbakk
2026-01-09  6:17       ` 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
2026-01-09  8:33 ` [PATCH v3 00/10] Start tracking packfiles per object database source Patrick Steinhardt
2026-01-09  8:33   ` [PATCH v3 01/10] packfile: create store via its owning source Patrick Steinhardt
2026-01-09  8:33   ` [PATCH v3 02/10] packfile: pass source to `prepare_pack()` Patrick Steinhardt
2026-01-09  8:33   ` [PATCH v3 03/10] packfile: refactor kept-pack cache to work with packfile stores Patrick Steinhardt
2026-01-09  8:33   ` [PATCH v3 04/10] packfile: refactor misleading code when unusing pack windows Patrick Steinhardt
2026-01-12 14:52     ` Karthik Nayak
2026-01-09  8:33   ` [PATCH v3 05/10] packfile: move packfile store into object source Patrick Steinhardt
2026-01-09  8:33   ` [PATCH v3 06/10] packfile: only prepare owning store in `packfile_store_get_packs()` Patrick Steinhardt
2026-01-09  8:33   ` [PATCH v3 07/10] packfile: only prepare owning store in `packfile_store_prepare()` Patrick Steinhardt
2026-01-09  8:33   ` [PATCH v3 08/10] packfile: inline `find_kept_pack_entry()` Patrick Steinhardt
2026-01-09  8:33   ` [PATCH v3 09/10] packfile: refactor `find_pack_entry()` to work on the packfile store Patrick Steinhardt
2026-01-09  8:33   ` [PATCH v3 10/10] packfile: move MIDX into " Patrick Steinhardt
2026-01-11  5:46   ` [PATCH v3 00/10] Start tracking packfiles per object database source Junio C Hamano
2026-01-12 15:27   ` Justin Tobler

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=877bttpnqt.fsf@iotcl.com \
    --to=toon@iotcl$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=jltobler@gmail$(echo .)com \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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