]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git.c
submodules: fix of regression on fetching of non-init subsub-repo
[thirdparty/git.git] / git.c
diff --git a/git.c b/git.c
index 8bd1d7551daa28dcde69935046a055243c4b4d99..4bdcdad2ccd3e7b268074dcffcbc9bbcbf273e8b 100644 (file)
--- a/git.c
+++ b/git.c
@@ -479,6 +479,7 @@ static struct cmd_struct commands[] = {
        { "bisect--helper", cmd_bisect__helper, RUN_SETUP },
        { "blame", cmd_blame, RUN_SETUP },
        { "branch", cmd_branch, RUN_SETUP | DELAY_PAGER_CONFIG },
+       { "bugreport", cmd_bugreport, RUN_SETUP_GENTLY },
        { "bundle", cmd_bundle, RUN_SETUP_GENTLY | NO_PARSEOPT },
        { "cat-file", cmd_cat_file, RUN_SETUP },
        { "check-attr", cmd_check_attr, RUN_SETUP },
@@ -499,6 +500,9 @@ static struct cmd_struct commands[] = {
        { "config", cmd_config, RUN_SETUP_GENTLY | DELAY_PAGER_CONFIG },
        { "count-objects", cmd_count_objects, RUN_SETUP },
        { "credential", cmd_credential, RUN_SETUP_GENTLY | NO_PARSEOPT },
+       { "credential-cache", cmd_credential_cache },
+       { "credential-cache--daemon", cmd_credential_cache_daemon },
+       { "credential-store", cmd_credential_store },
        { "describe", cmd_describe, RUN_SETUP },
        { "diff", cmd_diff, NO_PARSEOPT },
        { "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE | NO_PARSEOPT },
@@ -507,6 +511,7 @@ static struct cmd_struct commands[] = {
        { "difftool", cmd_difftool, RUN_SETUP_GENTLY },
        { "env--helper", cmd_env__helper },
        { "fast-export", cmd_fast_export, RUN_SETUP },
+       { "fast-import", cmd_fast_import, RUN_SETUP | NO_PARSEOPT },
        { "fetch", cmd_fetch, RUN_SETUP },
        { "fetch-pack", cmd_fetch_pack, RUN_SETUP | NO_PARSEOPT },
        { "fmt-merge-msg", cmd_fmt_merge_msg, RUN_SETUP },
@@ -529,6 +534,7 @@ static struct cmd_struct commands[] = {
        { "ls-tree", cmd_ls_tree, RUN_SETUP },
        { "mailinfo", cmd_mailinfo, RUN_SETUP_GENTLY | NO_PARSEOPT },
        { "mailsplit", cmd_mailsplit, NO_PARSEOPT },
+       { "maintenance", cmd_maintenance, RUN_SETUP_GENTLY | NO_PARSEOPT },
        { "merge", cmd_merge, RUN_SETUP | NEED_WORK_TREE },
        { "merge-base", cmd_merge_base, RUN_SETUP },
        { "merge-file", cmd_merge_file, RUN_SETUP_GENTLY },
@@ -632,6 +638,25 @@ static void list_builtins(struct string_list *out, unsigned int exclude_option)
        }
 }
 
+void load_builtin_commands(const char *prefix, struct cmdnames *cmds)
+{
+       const char *name;
+       int i;
+
+       /*
+        * Callers can ask for a subset of the commands based on a certain
+        * prefix, which is then dropped from the added names. The names in
+        * the `commands[]` array do not have the `git-` prefix, though,
+        * therefore we must expect the `prefix` to at least start with `git-`.
+        */
+       if (!skip_prefix(prefix, "git-", &prefix))
+               BUG("prefix '%s' must start with 'git-'", prefix);
+
+       for (i = 0; i < ARRAY_SIZE(commands); i++)
+               if (skip_prefix(commands[i].cmd, prefix, &name))
+                       add_cmdname(cmds, name, strlen(name));
+}
+
 #ifdef STRIP_EXTENSION
 static void strip_extension(const char **argv)
 {