t5551: do not assume the "matching" push is the default
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index d232de92e496bd5750015edce22d3b67f236b605..d33f9b32a2895ef9f062f9fda487588daac6f5bc 100644 (file)
--- a/git.c
+++ b/git.c
@@ -17,39 +17,6 @@ const char git_more_info_string[] =
 
 static struct startup_info git_startup_info;
 static int use_pager = -1;
-struct pager_config {
-       const char *cmd;
-       int want;
-       char *value;
-};
-
-static int pager_command_config(const char *var, const char *value, void *data)
-{
-       struct pager_config *c = data;
-       if (!prefixcmp(var, "pager.") && !strcmp(var + 6, c->cmd)) {
-               int b = git_config_maybe_bool(var, value);
-               if (b >= 0)
-                       c->want = b;
-               else {
-                       c->want = 1;
-                       c->value = xstrdup(value);
-               }
-       }
-       return 0;
-}
-
-/* returns 0 for "no pager", 1 for "use pager", and -1 for "not specified" */
-int check_pager_config(const char *cmd)
-{
-       struct pager_config c;
-       c.cmd = cmd;
-       c.want = -1;
-       c.value = NULL;
-       git_config(pager_command_config, &c);
-       if (c.value)
-               pager_program = c.value;
-       return c.want;
-}
 
 static void commit_pager_choice(void) {
        switch (use_pager) {
@@ -256,8 +223,6 @@ static int handle_alias(int *argcp, const char ***argv)
        return ret;
 }
 
-const char git_version_string[] = GIT_VERSION;
-
 #define RUN_SETUP              (1<<0)
 #define RUN_SETUP_GENTLY       (1<<1)
 #define USE_PAGER              (1<<2)
@@ -353,6 +318,7 @@ static void handle_internal_command(int argc, const char **argv)
                { "commit-tree", cmd_commit_tree, RUN_SETUP },
                { "config", cmd_config, RUN_SETUP_GENTLY },
                { "count-objects", cmd_count_objects, RUN_SETUP },
+               { "credential", cmd_credential, RUN_SETUP_GENTLY },
                { "describe", cmd_describe, RUN_SETUP },
                { "diff", cmd_diff },
                { "diff-files", cmd_diff_files, RUN_SETUP | NEED_WORK_TREE },