Thread View: linux.kernel.git
1 messages
1 total messages
Started by Junio C Hamano
Wed, 28 Oct 2026 07:37
Re: [PATCH] pack-objects: handle missing objects when excluding promisor objects
Author: Junio C Hamano
Date: Wed, 28 Oct 2026 07:37
Date: Wed, 28 Oct 2026 07:37
29 lines
13744 bytes
13744 bytes
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.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads