Re: [PATCH v2 2/2] submodule: port submodule subcommand 'deinit' from shell to C

2018-01-11 Thread Junio C Hamano
Prathamesh Chavan writes: > + /* remove the submodule work tree (unless the user already did it) */ > + if (is_directory(path)) { > + struct strbuf sb_rm = STRBUF_INIT; > + const char *format; > + > + /* > + * protect

[PATCH v2 2/2] submodule: port submodule subcommand 'deinit' from shell to C

2018-01-11 Thread Prathamesh Chavan
The same mechanism is used even for porting this submodule subcommand, as used in the ported subcommands till now. The function cmd_deinit in split up after porting into four functions: module_deinit(), for_each_listed_submodule(), deinit_submodule() and deinit_submodule_cb(). Mentored-by: