[PATCH 1/2] pager_in_use: use git_env_bool
From: Jeff King <hidden>
Date: 2016-06-15 23:06:07
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Jeff King <hidden>
Date: 2016-06-15 23:06:07
Subsystem:
the rest · Maintainer:
Linus Torvalds
This function basically reimplements git_env_bool (because it predates it). Let's reuse that helper, which is shorter and avoids repeating a string literal. Signed-off-by: Jeff King <redacted> --- pager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/pager.c b/pager.c
index 070dc11..e3ad465 100644
--- a/pager.c
+++ b/pager.c@@ -95,9 +95,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); } /*
--
2.5.0.414.g670f2a4