Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
pager_in_use: use git_env_bool()
author
Jeff King
<peff@peff.net>
Fri, 24 Mar 2017 18:59:12 +0000
(14:59 -0400)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 24 Mar 2017 19:14:11 +0000
(12:14 -0700)
The pager_in_use() function predates git_env_bool(), but
ends up doing the same thing. Let's make use of the latter,
which is shorter and less repetitive.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pager.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
8624735
)
diff --git
a/pager.c
b/pager.c
index ae79643363091f4967097bdff6e009ea4c7df5e0..ec85fdf4c6a79433972ba164e695cae035109123 100644
(file)
--- a/
pager.c
+++ b/
pager.c
@@
-166,9
+166,7
@@
void setup_pager(void)
int pager_in_use(void)
{
- const char *env;
- env = getenv("GIT_PAGER_IN_USE");
- return env ? git_config_bool("GIT_PAGER_IN_USE", env) : 0;
+ return git_env_bool("GIT_PAGER_IN_USE", 0);
}
/*