git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] pack-objects: handle missing objects when excluding promisor objects

From
Patrick Steinhardt <ps@pks.im>
Date
Dec 3, 2026, 06:55 UTC
Message-ID
<axESVVMtGk-QgQOj@pks.im>
In-Reply-To
<xmqqtskvz7rs.fsf@gitster.g>
On Thu, Dec 03, 2026 at 06:34:31AM +0900, Junio C Hamano wrote:
Show 32 quoted lines
> Patrick Steinhardt <ps@pks.im> writes:
> 
> > diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
> > index ca3a891dfbc..61f2d8a067c 100644
> > --- a/builtin/pack-objects.c
> > +++ b/builtin/pack-objects.c
> > @@ -5084,8 +5084,10 @@ static int is_not_in_promisor_pack_obj(struct object *obj, void *data UNUSED)
> >  		.source_infop = &source_info,
> >  	};
> >  
> > -	if (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info, 0))
> > -		BUG("should_include_obj should only be called on existing objects");
> > +	if (odb_read_object_info_extended(the_repository->objects, &obj->oid, &info,
> > +					  OBJECT_INFO_SKIP_FETCH_OBJECT))
> > +		/* Missing; assume it is a promisor object */
> > +		return 0;
> 
> This "Missing - assume it is a promisor object" somehow felt familiar
> in that I recall making a comment on it, and I think it applies equally
> here, but I do not see it in the list archive on this thread.
> 
>     Screatches head, goes looking ...
> 
> Ah, I found it.
> 
>   https://lore.kernel.org/git/xmqqzeuwwmt1.fsf@gitster.g/
> 
> Are these duplicated efforts by any chance?  Can we squash them into a
> single series, taking the best from both?
> 
> Thanks.  I won't be reading any more until next week (still in
> vacation).

Interesting, didn't notice that patch series. Alessio, are you okay with me taking your comment and adding you as a Co-authored-by? Then we can take this patch here in favor of yours.

Thanks!
Patrick
Previous: Junio C HamanoNext: Patrick Steinhardt
Message 9 of 11 in “pack-objects: handle missing objects when excluding promisor objects”
  1. pack-objects: handle missing objects when excluding promisor objectsPatrick Steinhardt, Oct 27, 2026
  2. Mark C. Chu-CarrollOct 27, 2026
  3. Patrick SteinhardtOct 28, 2026
  4. Junio C HamanoOct 28, 2026
  5. Patrick SteinhardtOct 28, 2026
  6. Sami JawharNov 28, 2026
  7. pack-objects: handle missing objects when excluding promisor objectsPatrick Steinhardt, Dec 2, 2026
  8. Junio C HamanoDec 2, 2026
  9. Patrick SteinhardtDec 3, 2026
  10. Patrick SteinhardtDec 3, 2026
  11. ATTILIO ALESSIODec 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.