Re: [PATCH 1/2] submodule--helper: initial clone learns retry logic

2016-06-09 Thread Stefan Beller
On Thu, Jun 9, 2016 at 1:40 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Stefan Beller writes: >> >>> instead. But that is still unspecified, so we rather go with >>> >>> static int compare_ce(const void *one, const void *two,

Re: [PATCH 1/2] submodule--helper: initial clone learns retry logic

2016-06-09 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> instead. But that is still unspecified, so we rather go with >> >> static int compare_ce(const void *one, const void *two, void *cb_data) >> { >> const struct cache_entry *ce_one = one, *ce_two = two;

Re: [PATCH 1/2] submodule--helper: initial clone learns retry logic

2016-06-09 Thread Junio C Hamano
Stefan Beller writes: > instead. But that is still unspecified, so we rather go with > > static int compare_ce(const void *one, const void *two, void *cb_data) > { > const struct cache_entry *ce_one = one, *ce_two = two; > return strcmp(ce_one->name, ce_two->name); >

Re: [PATCH 1/2] submodule--helper: initial clone learns retry logic

2016-06-09 Thread Stefan Beller
On Thu, Jun 9, 2016 at 12:19 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> +static int compare_ce(const void *one, const void *two, void *cb_data) >> +{ >> + const struct cache_entry *ce_one = one, *ce_two = two; >> + return ce_two -

Re: [PATCH 1/2] submodule--helper: initial clone learns retry logic

2016-06-09 Thread Junio C Hamano
Stefan Beller writes: > +static int compare_ce(const void *one, const void *two, void *cb_data) > +{ > + const struct cache_entry *ce_one = one, *ce_two = two; > + return ce_two - ce_one; > +} This would work in practice, but I suspect that this is not ANSI-C kosher;

[PATCH 1/2] submodule--helper: initial clone learns retry logic

2016-06-09 Thread Stefan Beller
Each submodule that is attempted to be cloned, will be retried once in case of failure after all other submodules were cloned. This helps to mitigate ephemeral server failures and increases chances of a reliable clone of a repo with hundreds of submodules immensely. The choice of the priority