From: Stefan Beller Date: Thu, 21 Jan 2016 00:20:57 GMT Subject: Re: [PATCH 2/4] submodule-config: keep groups around Message-ID: In-Reply-To: On Wed, Jan 20, 2016 at 1:23 PM, Junio C Hamano wrote: >> free((void *) entry->config->name); >> + if (entry->config->groups) >> + string_list_clear(entry->config->groups, 0); > > You are allocating entry->config->groups itself in the in the hunk > around ll.327, so that also need to be freed, I would think. done >> unsigned char gitmodules_sha1[20]; >> + struct string_list *groups; >> }; > > Is there a case where you need to enumerate and show the groups a > submodule belongs to to the end users? Using string_list_insert() > to manage this list would mean you will lose the original ordering > you saw the list of groups in their .gitmodules files, which may or > may not matter. I'd assume that the ordering should not matter, but > that is something the user may want to see documented. In this patch series we only need to check the items of that list one by one, no need for a sorted version, so I'll change it to be unsorted and document that. > >> >> int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg);