path: root/builtin.h
diff options
authorStefan Beller <>2015-09-02 21:42:24 (GMT)
committerJunio C Hamano <>2015-09-03 21:12:40 (GMT)
commit74703a1e4dfc5affcb8944e78b53f0817b492246 (patch)
treea3f41ccf0a838804fd763bb44fba08d85f91c1ca /builtin.h
parent5a1ba6b48a62bf55f9c8305d9850c3a8d22365c5 (diff)
submodule: rewrite `module_list` shell function in C
Most of the submodule operations work on a set of submodules. Calculating and using this set is usually done via: module_list "$@" | { while read mode sha1 stage sm_path do # the actual operation done } Currently the function `module_list` is implemented in the as a shell script wrapping a perl script. The rewrite is in C, such that it is faster and can later be easily adapted when other functions are rewritten in C., similar to the builtin commands, will navigate to the top-most directory of the repository and keep the subdirectory as a variable. As the helper is called from within the script, we are already navigated to the root level, but the path arguments are still relative to the subdirectory we were in when calling That's why there is a `--prefix` option pointing to an alternative path which to anchor relative path arguments. Signed-off-by: Stefan Beller <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'builtin.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin.h b/builtin.h
index 839483d..924e6c4 100644
--- a/builtin.h
+++ b/builtin.h
@@ -119,6 +119,7 @@ extern int cmd_show(int argc, const char **argv, const char *prefix);
extern int cmd_show_branch(int argc, const char **argv, const char *prefix);
extern int cmd_status(int argc, const char **argv, const char *prefix);
extern int cmd_stripspace(int argc, const char **argv, const char *prefix);
+extern int cmd_submodule__helper(int argc, const char **argv, const char *prefix);
extern int cmd_symbolic_ref(int argc, const char **argv, const char *prefix);
extern int cmd_tag(int argc, const char **argv, const char *prefix);
extern int cmd_tar_tree(int argc, const char **argv, const char *prefix);