Re: [PATCH v1 1/2] submodule: port submodule subcommand 'sync' from shell to C

2018-01-09 Thread Junio C Hamano
Prathamesh Chavan writes: > +static int print_default_remote(int argc, const char **argv, const char > *prefix) > +{ > + const char *remote; > + > + if (argc != 1) > + die(_("submodule--helper print-default-remote takes no > arguments")); > + > +

[PATCH v1 1/2] submodule: port submodule subcommand 'sync' from shell to C

2018-01-09 Thread Prathamesh Chavan
Port the submodule subcommand 'sync' from shell to C using the same mechanism as that used for porting submodule subcommand 'status'. Hence, here the function cmd_sync() is ported from shell to C. This is done by introducing four functions: module_sync(), sync_submodule(), sync_submodule_cb() and