Move setup_diff_pager to libgit.a
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index 8788b32ccd891eb4db25fd6f1232935635d5a153..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) {