summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-11-09 12:51:06 -0500
committerJeff King <peff@peff.net>2012-11-09 12:51:06 -0500
commit19fb61369583410a4f79dbc065b4dc8125236c0b (patch)
tree7f7498d204f8df97ddc0cd6726154a0ce5fa5bb7 /git.c
parent9d91c0e3d5d1bf9339a31ecbd5f6defdac8540d0 (diff)
parent745f7a8cacae55df3e00507344d8db2a31eb57e8 (diff)
Merge branch 'nd/builtin-to-libgit'
Code cleanups so that libgit.a does not depend on anything in the builtin/ directory. * nd/builtin-to-libgit: fetch-pack: move core code to libgit.a fetch-pack: remove global (static) configuration variable "args" send-pack: move core code to libgit.a Move setup_diff_pager to libgit.a Move print_commit_list to libgit.a Move estimate_bisect_steps to libgit.a Move try_merge_command and checkout_fast_forward to libgit.a
Diffstat (limited to 'git.c')
-rw-r--r--git.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/git.c b/git.c
index 8788b32ccd..d33f9b32a2 100644
--- 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) {