Re: [PATCH 4/6] builtin/receive-pack: report unpack errors via strbuf
Justin Tobler <[email protected]>
| Newsgroups | org.kernel.vger.git |
|---|---|
| Message-ID | <ani4GoefzYFWjTMl@denethor> |
On 26/08/07 10:36AM, Justin Tobler wrote:
> On 26/08/07 09:03AM, Patrick Steinhardt wrote:
> > > @@ -2711,8 +2719,8 @@ int cmd_receive_pack(int argc,
> > > PACKET_READ_DIE_ON_ERR_PACKET);
> > >
> > > if ((commands = read_head_info(&reader, &shallow))) {
> > > - const char *unpack_status = NULL;
> > > struct string_list push_options = STRING_LIST_INIT_DUP;
> > > + struct strbuf unpack_status = STRBUF_INIT;
> >
> > Can't we reuse this buffer and reset it on every run to save some memory
> > allocations?
Looking at this more closely, there isn't actually any loop we are
running this in so I don't think there is any need to change how
`unpack_status` is set up here.
-Justin