t3311: use test_commit_bulk
[gitweb.git] / builtin / clone.c
index 35124aa044ef68d33174c5a9acb91ec9a037261f..5b9ebe994761bd7b45209037b6eab63e28a78efb 100644 (file)
@@ -100,10 +100,7 @@ static struct option builtin_clone_options[] = {
                    N_("don't use local hardlinks, always copy")),
        OPT_BOOL('s', "shared", &option_shared,
                    N_("setup as shared repository")),
-       { OPTION_CALLBACK, 0, "recursive", &option_recurse_submodules,
-         N_("pathspec"), N_("initialize submodules in the clone"),
-         PARSE_OPT_OPTARG | PARSE_OPT_HIDDEN, recurse_submodules_cb,
-         (intptr_t)"." },
+       OPT_ALIAS(0, "recursive", "recurse-submodules"),
        { OPTION_CALLBACK, 0, "recurse-submodules", &option_recurse_submodules,
          N_("pathspec"), N_("initialize submodules in the clone"),
          PARSE_OPT_OPTARG, recurse_submodules_cb, (intptr_t)"." },
@@ -360,8 +357,7 @@ static void setup_reference(void)
                             add_one_reference, &required);
 }
 
-static void copy_alternates(struct strbuf *src, struct strbuf *dst,
-                           const char *src_repo)
+static void copy_alternates(struct strbuf *src, const char *src_repo)
 {
        /*
         * Read from the source objects/info/alternates file
@@ -442,7 +438,7 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest,
 
                /* Files that cannot be copied bit-for-bit... */
                if (!strcmp(src->buf + src_baselen, "/info/alternates")) {
-                       copy_alternates(src, dest, src_repo);
+                       copy_alternates(src, src_repo);
                        continue;
                }
 
@@ -1231,7 +1227,7 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
                        remote_head_points_at, &branch_top);
 
        if (filter_options.choice)
-               partial_clone_register("origin", &filter_options);
+               partial_clone_register(option_origin, &filter_options);
 
        if (is_local)
                clone_local(path, git_dir);