diff options
author | Jeff King <peff@peff.net> | 2007-12-11 07:27:33 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-11 09:42:05 +0100 |
commit | 6e9af863ee76423ec8416ad16140ef5f810783bf (patch) | |
tree | 147f4006c3c054d3777f704795b74e2d0574bfd7 /environment.c | |
parent | Update draft Release Notes for 1.5.4 (diff) | |
download | git-6e9af863ee76423ec8416ad16140ef5f810783bf.tar.xz git-6e9af863ee76423ec8416ad16140ef5f810783bf.zip |
Support GIT_PAGER_IN_USE environment variable
When deciding whether or not to turn on automatic color
support, git_config_colorbool checks whether stdout is a
tty. However, because we run a pager, if stdout is not a
tty, we must check whether it is because we started the
pager. This used to be done by checking the pager_in_use
variable.
This variable was set only when the git program being run
started the pager; there was no way for an external program
running git indicate that it had already started a pager.
This patch allows a program to set GIT_PAGER_IN_USE to a
true value to indicate that even though stdout is not a tty,
it is because a pager is being used.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
-rw-r--r-- | environment.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/environment.c b/environment.c index f3e3d4138d..18a1c4eec4 100644 --- a/environment.c +++ b/environment.c @@ -31,7 +31,6 @@ 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; char *editor_program; char *excludes_file; |