]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/submodule--helper.c
submodule: port submodule subcommand 'sync' from shell to C
authorPrathamesh Chavan <pc44800@gmail.com>
Sun, 14 Jan 2018 21:15:28 +0000 (02:45 +0530)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Jan 2018 19:29:48 +0000 (11:29 -0800)
commit13424764db3273091d136bd470cf14852255c98c
tree6c63b2edb61312b2438f31d2dd8a6ab4e55d18f0
parent36438dc19dd2a305dddebd44bf7a65f1a220075b
submodule: port submodule subcommand 'sync' from shell to C

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 print_default_remote().

The function print_default_remote() is introduced for getting
the default remote as stdout.

Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Prathamesh Chavan <pc44800@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/submodule--helper.c
git-submodule.sh