Re: [PATCH v2 6/6] submodule--helper: introduce new update-module-mode helper

2018-07-17 Thread Junio C Hamano
SZEDER Gábor writes: >> +fprintf(stdout, submodule_strategy_to_string(&update_strategy)); > > Various compilers warn about the potential insecurity of the above > call: > > CC builtin/submodule--helper.o > builtin/submodule--helper.c: In function ‘module_update_module_mode’: > built

Re: [PATCH v2 6/6] submodule--helper: introduce new update-module-mode helper

2018-07-17 Thread SZEDER Gábor
> diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c > index 034ba1bb2e0..d4cb7c72e33 100644 > --- a/builtin/submodule--helper.c > +++ b/builtin/submodule--helper.c > +static int module_update_module_mode(int argc, const char **argv, const char > *prefix) > +{ > + const

[PATCH v2 6/6] submodule--helper: introduce new update-module-mode helper

2018-07-16 Thread Stefan Beller
This chews off a bit of the shell part of the update command in git-submodule.sh. When writing the C code, keep in mind that the submodule--helper part will go away eventually and we want to have a C function that is able to determine the submodule update strategy, it as a nicety, make determine_su