Re: [PATCHv4 8/8] clone: recursive and reference option triggers submodule alternates

2016-08-17 Thread Stefan Beller
On Wed, Aug 17, 2016 at 2:31 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Stefan Beller writes: >> >>> +static void prepare_possible_alternates(const char *sm_name, >>> +struct string_list *reference) >>> +{ >>> +

Re: [PATCHv4 8/8] clone: recursive and reference option triggers submodule alternates

2016-08-17 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> +static void prepare_possible_alternates(const char *sm_name, >> +struct string_list *reference) >> +{ >> +char *sm_alternate = NULL, *error_strategy = NULL; >> +struct

Re: [PATCHv4 8/8] clone: recursive and reference option triggers submodule alternates

2016-08-17 Thread Stefan Beller
On Wed, Aug 17, 2016 at 1:02 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> +static void prepare_possible_alternates(const char *sm_name, >> + struct string_list *reference) >> +{ >> + char *sm_alternate = NULL, *error_strategy =

Re: [PATCHv4 8/8] clone: recursive and reference option triggers submodule alternates

2016-08-17 Thread Junio C Hamano
Stefan Beller writes: > +static void prepare_possible_alternates(const char *sm_name, > + struct string_list *reference) > +{ > + char *sm_alternate = NULL, *error_strategy = NULL; > + struct submodule_alternate_setup sas = SUBMODULE_ALTERNATE_SETUP_INIT;

Re: [PATCHv4 8/8] clone: recursive and reference option triggers submodule alternates

2016-08-12 Thread Junio C Hamano
Stefan Beller writes: > +int add_possible_reference_from_superproject( > + struct alternate_object_database *alt, void *sas_cb) > +{ > + struct submodule_alternate_setup *sas = sas_cb; > + > + ... > + size_t namelen = alt->name - alt->base - 1; > +

[PATCHv4 8/8] clone: recursive and reference option triggers submodule alternates

2016-08-11 Thread Stefan Beller
When `--recursive` and `--reference` is given, it is reasonable to expect that the submodules are created with references to the submodules of the given alternate for the superproject. An initial attempt to do this was presented to the mailing list, which used flags that are passed around