Re: [GSoC][PATCH 5/6] submodule: port submodule subcommand sync from shell to C

2017-06-21 Thread Christian Couder
On Mon, Jun 19, 2017 at 11:50 PM, Prathamesh Chavan wrote: > +static char *get_up_path(const char *path) > +{ > + int i = count_slashes(path); > + struct strbuf sb = STRBUF_INIT; > + > + while (i--) > + strbuf_addstr(&sb, "../"); > + > + /* > +*Check

Re: [GSoC][PATCH 5/6] submodule: port submodule subcommand sync from shell to C

2017-06-20 Thread Stefan Beller
On Mon, Jun 19, 2017 at 2:50 PM, Prathamesh Chavan wrote: > The mechanism used for porting the submodule subcommand 'sync' is > similar to that of 'foreach', where we split the function cmd_sync > from shell into three functions in C, module_sync, > for_each_submodule_list and sync_submodule. > >

[GSoC][PATCH 5/6] submodule: port submodule subcommand sync from shell to C

2017-06-19 Thread Prathamesh Chavan
The mechanism used for porting the submodule subcommand 'sync' is similar to that of 'foreach', where we split the function cmd_sync from shell into three functions in C, module_sync, for_each_submodule_list and sync_submodule. print_default_remote is introduced as a submodule--helper subcommand f