From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org, Daniel Zoghalchali <daniel@latchkey.dev>
Subject: Re: [PATCH] pack-objects: handle missing objects when excluding promisor objects
Date: Wed, 28 Oct 2026 00:37:02 -0700 [thread overview]
Message-ID: <xmqq7bj2e0o1.fsf@gitster.g> (raw)
In-Reply-To: <20261027-b4-pks-pack-objects-repack-links-with-missing-objects-v1-1-f50f90651274@pks.im> (Patrick Steinhardt's message of "Tue, 27 Oct 2026 08:00:28 +0100")
Patrick Steinhardt <ps@pks.im> writes:
> this patch fixes the issue reported in [1]. Thanks!
> builtin/pack-objects.c | 3 ++-
> t/t5616-partial-clone.sh | 55 ++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 57 insertions(+), 1 deletion(-)
>
> diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
> index ca3a891dfbc..d6caed16d97 100644
> --- a/builtin/pack-objects.c
> +++ b/builtin/pack-objects.c
> @@ -5085,7 +5085,8 @@ static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)
> };
>
> if (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))
> - BUG("should_include_obj should only be called on existing objects");
> + /* Missing; assume it is a promisor object */
> + return 0;
It is not entirely the fault of this patch, but the code relies on
.fetch_if_missing being set to 0 elsewhere. While that is not wrong
per se, shouldn't this call to odb_read_object_info_extended() pass
the OBJECT_INFO_SKIP_FETCH_OBJECT bit explicitly for clarity?
> return source_info.source->type != ODB_SOURCE_PACKED || !source_info.u.packed.pack->pack_promisor;
> }
Thanks.
next prev parent reply other threads:[~2026-10-28 7:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 7:00 [PATCH] pack-objects: handle missing objects when excluding promisor objects Patrick Steinhardt
2026-10-27 16:02 ` [PATCH] pack-objects: handle missing objects kkkjwhen " Mark C. Chu-Carroll
2026-10-28 7:26 ` Patrick Steinhardt
2026-10-28 7:37 ` Junio C Hamano [this message]
2026-10-28 11:50 ` [PATCH] pack-objects: handle missing objects when " 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=xmqq7bj2e0o1.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=daniel@latchkey.dev \
--cc=git@vger.kernel.org \
--cc=ps@pks.im \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.