Re: [PATCH 1/2] serialize collection of changed submodules
On Fri, Sep 16, 2016 at 10:27:04AM -0700, Junio C Hamano wrote:
Show 21 quoted lines
> Heiko Voigt <hvoigt@hvoigt.net> writes:
>
> > +static struct sha1_array *get_sha1s_from_list(struct string_list *submodules,
> > + const char *path)
> > +{
> > + struct string_list_item *item;
> > + struct sha1_array *hashes;
> > +
> > + item = string_list_insert(submodules, path);
> > + if (item->util)
> > + return (struct sha1_array *) item->util;
> > +
> > + hashes = (struct sha1_array *) xmalloc(sizeof(struct sha1_array));
> > + /* NEEDSWORK: should we add an initializer function for
> > + * sha1_array ? */
> > + memset(hashes, 0, sizeof(struct sha1_array));
> > + item->util = hashes;
>
>
> /* NEEDSWORK: should we have SHA1_ARRAY_INIT etc.? */
> item->util = xcalloc(1, sizeof(struct sha1_array));