summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3f0a8f3)
raw | patch | inline | side by side (parent: 3f0a8f3)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 7 Aug 2007 04:08:43 +0000 (21:08 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 7 Aug 2007 04:10:59 +0000 (21:10 -0700) |
It was very unfortunate that we added core.pager setting to the
configuration file; even when the underlying command does not care
if there is no git repository is involved (think "git diff --no-index"),
the user would now rightfully want the configuration setting to be
honored, which means we would need to read the configuration file before
we launch the pager.
This is a minimum change in the sense that it restores the old
behaviour of not even reading config in setup_git_directory(),
but have the core.pager honored when we know it matters.
Note that this does not cover "git -p --git-dir where command";
the -p option immediately trigger the pager settings before we
even see --git-dir to learn where the configuration file is, so
we will end up reading the configuration from the place where
we would _normally_ find the git repository.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
configuration file; even when the underlying command does not care
if there is no git repository is involved (think "git diff --no-index"),
the user would now rightfully want the configuration setting to be
honored, which means we would need to read the configuration file before
we launch the pager.
This is a minimum change in the sense that it restores the old
behaviour of not even reading config in setup_git_directory(),
but have the core.pager honored when we know it matters.
Note that this does not cover "git -p --git-dir where command";
the -p option immediately trigger the pager settings before we
even see --git-dir to learn where the configuration file is, so
we will end up reading the configuration from the place where
we would _normally_ find the git repository.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pager.c | patch | blob | history |
index 3bfed025996bbdc31aebd4a7b096236c538a4e75..8bac9d990381f5664333a92f68b0b8cd97d43855 100644 (file)
--- a/pager.c
+++ b/pager.c
if (!isatty(1))
return;
- if (!pager)
+ if (!pager) {
+ if (!pager_program)
+ git_config(git_default_config);
pager = pager_program;
+ }
if (!pager)
pager = getenv("PAGER");
if (!pager)