Turn `git serve` into a test helper
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index 0ce0e13f0f4879ae4608bd61d3a6a1f55ef7892e..c58b067771cfd92593e4812ee373fd0e201b72a0 100644 (file)
--- a/git.c
+++ b/git.c
@@ -418,9 +418,9 @@ static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
 
        trace_argv_printf(argv, "trace: built-in: git");
 
-       validate_cache_entries(&the_index);
+       validate_cache_entries(the_repository->index);
        status = p->fn(argc, argv, prefix);
-       validate_cache_entries(&the_index);
+       validate_cache_entries(the_repository->index);
 
        if (status)
                return status;
@@ -548,7 +548,6 @@ static struct cmd_struct commands[] = {
        { "revert", cmd_revert, RUN_SETUP | NEED_WORK_TREE },
        { "rm", cmd_rm, RUN_SETUP },
        { "send-pack", cmd_send_pack, RUN_SETUP },
-       { "serve", cmd_serve, RUN_SETUP },
        { "shortlog", cmd_shortlog, RUN_SETUP_GENTLY | USE_PAGER },
        { "show", cmd_show, RUN_SETUP },
        { "show-branch", cmd_show_branch, RUN_SETUP },