Re: [GSoC][PATCH v2 2/4] submodule--helper: introduce for_each_submodule()

2017-08-23 Thread Junio C Hamano
Stefan Beller writes: > On Wed, Aug 23, 2017 at 12:13 PM, Junio C Hamano wrote: >> Prathamesh Chavan writes: >> >>> +typedef void (*submodule_list_func_t)(const struct cache_entry *list_item, >>> + void

Re: [GSoC][PATCH v2 2/4] submodule--helper: introduce for_each_submodule()

2017-08-23 Thread Stefan Beller
On Wed, Aug 23, 2017 at 12:13 PM, Junio C Hamano wrote: > Prathamesh Chavan writes: > >> +typedef void (*submodule_list_func_t)(const struct cache_entry *list_item, >> + void *cb_data); >> + >> static char

Re: [GSoC][PATCH v2 2/4] submodule--helper: introduce for_each_submodule()

2017-08-23 Thread Junio C Hamano
Prathamesh Chavan writes: > +typedef void (*submodule_list_func_t)(const struct cache_entry *list_item, > + void *cb_data); > + > static char *get_default_remote(void) > { > char *dest = NULL, *ret; > @@ -353,17 +356,30 @@ static int

[GSoC][PATCH v2 2/4] submodule--helper: introduce for_each_submodule()

2017-08-23 Thread Prathamesh Chavan
Introduce function for_each_submodule() and replace a loop in module_init() with a call to it. The new function will also be used in other parts of the system in later patches. Mentored-by: Christian Couder Mentored-by: Stefan Beller