summaryrefslogtreecommitdiff
path: root/compat/msvc.c
diff options
context:
space:
mode:
authorLibravatar Prathamesh Chavan <pc44800@gmail.com>2017-10-06 18:54:15 +0530
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-07 17:52:35 +0900
commita9f8a37584a6d3e4702ce115476bebda20d871d3 (patch)
tree33fdfd4c744412dfe2179e358ff4d8d0d3bb0a2e /compat/msvc.c
parentsubmodule--helper: introduce for_each_listed_submodule() (diff)
downloadtgif-a9f8a37584a6d3e4702ce115476bebda20d871d3.tar.xz
submodule: port submodule subcommand 'status' from shell to C
This aims to make git-submodule 'status' a built-in. Hence, the function cmd_status() is ported from shell to C. This is done by introducing four functions: module_status(), submodule_status_cb(), submodule_status() and print_status(). The function module_status() acts as the front-end of the subcommand. It parses subcommand's options and then calls the function module_list_compute() for computing the list of submodules. Then this functions calls for_each_listed_submodule() looping through the list obtained. Then for_each_listed_submodule() calls submodule_status_cb() for each of the submodule in its list. The function submodule_status_cb() calls submodule_status() after passing appropriate arguments to the funciton. Function submodule_status() is responsible for generating the status each submodule it is called for, and then calls print_status(). Finally, the function print_status() handles the printing of submodule's status. Function set_name_rev() is also ported from git-submodule to the submodule--helper builtin function compute_rev_name(), which now generates the value of the revision name as required. 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>
Diffstat (limited to 'compat/msvc.c')
0 files changed, 0 insertions, 0 deletions