clone: use git protocol for cloning shallow repo locally
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index 1188979465654248c5936e8246886341846cc6f1..179c4f6ff81d1f482e62248e33eacb74327df2b8 100644 (file)
--- a/git.c
+++ b/git.c
@@ -162,7 +162,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
                } else if (!strcmp(cmd, "--shallow-file")) {
                        (*argv)++;
                        (*argc)--;
-                       set_alternate_shallow_file((*argv)[0]);
+                       set_alternate_shallow_file((*argv)[0], 1);
                        if (envchanged)
                                *envchanged = 1;
                } else if (!strcmp(cmd, "-C")) {
@@ -419,6 +419,7 @@ static void handle_internal_command(int argc, const char **argv)
                { "remote", cmd_remote, RUN_SETUP },
                { "remote-ext", cmd_remote_ext },
                { "remote-fd", cmd_remote_fd },
+               { "repack", cmd_repack, RUN_SETUP },
                { "replace", cmd_replace, RUN_SETUP },
                { "repo-config", cmd_repo_config, RUN_SETUP_GENTLY },
                { "rerere", cmd_rerere, RUN_SETUP },