From: Patrick Steinhardt Date: Mon, 08 Jun 2026 13:53:31 GMT Subject: Re: [PATCH 4/7] packfile: widen unpack_entry()'s size out-parameter to size_t Message-ID: In-Reply-To: On Thu, Jun 04, 2026 at 10:51:09AM +0000, Johannes Schindelin via GitGitGadget wrote: > diff --git a/builtin/fast-import.c b/builtin/fast-import.c > index 82bc6dcc00..3dff898c43 100644 > --- a/builtin/fast-import.c > +++ b/builtin/fast-import.c > @@ -1239,6 +1239,8 @@ static void *gfi_unpack_entry( > unsigned long *sizep) > { > enum object_type type; > + size_t size_st = 0; > + void *data; > struct packed_git *p = all_packs[oe->pack_id]; > if (p == pack_data && p->pack_size < (pack_size + the_hash_algo->rawsz)) { > /* The object is stored in the packfile we are writing to > @@ -1260,7 +1262,10 @@ static void *gfi_unpack_entry( > */ > p->pack_size = pack_size + the_hash_algo->rawsz; > } > - return unpack_entry(the_repository, p, oe->idx.offset, &type, sizep); > + data = unpack_entry(the_repository, p, oe->idx.offset, &type, &size_st); > + if (sizep) > + *sizep = cast_size_t_to_ulong(size_st); > + return data; > } Nit, please feel free to ignore: do we want to add a NEEDSWORK comment here? Patrick