summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 41c7c1b)
raw | patch | inline | side by side (parent: 41c7c1b)
author | Brian Gernhardt <benji@silverinsanity.com> | |
Tue, 3 Jul 2007 18:18:11 +0000 (14:18 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 4 Jul 2007 17:09:32 +0000 (10:09 -0700) |
This adds a configuration variable that performs the same function as,
but is overridden by, GIT_PAGER.
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Acked-by: Johannes E. Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
but is overridden by, GIT_PAGER.
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Acked-by: Johannes E. Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt | patch | blob | history | |
cache.h | patch | blob | history | |
config.c | patch | blob | history | |
environment.c | patch | blob | history | |
pager.c | patch | blob | history |
index 1d96adf30bd917b019424cf83f7a25365b721303..66a55b0514b3a1427792f3e2865f34bc642e1e48 100644 (file)
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
of files which are not meant to be tracked. See
gitlink:gitignore[5].
+core.pager::
+ The command that git will use to paginate output. Can be overridden
+ with the `GIT_PAGER` environment variable.
+
alias.*::
Command aliases for the gitlink:git[1] command wrapper - e.g.
after defining "alias.last = cat-file commit HEAD", the invocation
index 0d23a25b1f7d4ff62c9888aa69e0bf3f2884b811..e64071e2e352fee7d42d1896728e5d64626f3c49 100644 (file)
--- a/cache.h
+++ b/cache.h
@@ -546,6 +546,7 @@ extern int write_or_whine_pipe(int fd, const void *buf, size_t count, const char
/* pager.c */
extern void setup_pager(void);
+extern char *pager_program;
extern int pager_in_use;
extern int pager_use_color;
diff --git a/config.c b/config.c
index 4de892633037620504575eaf018415e970c8efbd..561ee3b576ae32f10959d3f1b76f6cc62e31d45a 100644 (file)
--- a/config.c
+++ b/config.c
return 0;
}
+ if (!strcmp(var, "core.pager")) {
+ pager_program = xstrdup(value);
+ return 0;
+ }
+
/* Add other config variables here and to Documentation/config.txt. */
return 0;
}
diff --git a/environment.c b/environment.c
index 1c2773f1bd4cc763485fc2b9f73615463443ab18..f83fb9e44806c03cde06eede7888a4dcb901c5c3 100644 (file)
--- a/environment.c
+++ b/environment.c
size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE;
size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT;
size_t delta_base_cache_limit = 16 * 1024 * 1024;
+char *pager_program;
int pager_in_use;
int pager_use_color = 1;
int auto_crlf = 0; /* 1: both ways, -1: only when adding git objects */