From: Felipe Contreras Date: Mon, 03 Jun 2013 20:55:44 GMT Subject: Re: [PATCH v2 4/8] cherry-pick: store rewritten commits Message-ID: In-Reply-To: <7vmwr7do7s.fsf@alter.siamese.dyndns.org> On Mon, Jun 3, 2013 at 1:49 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> +static void add_rewritten(unsigned char *from, unsigned char *to) >> +{ >> + struct rewritten_list_item *item; >> + if (rewritten.nr + 1 >= rewritten.alloc) { >> + rewritten.alloc += 32; >> + rewritten.items = xrealloc(rewritten.items, rewritten.alloc * sizeof(*rewritten.items)); >> + } > > Is there a compelling reason not to use ALLOC_GROW() here? Nope, I just copied the logic from another part of Git. -- Felipe Contreras