From: Jeff King Date: Fri, 24 Mar 2017 18:59:12 +0000 (-0400) Subject: pager_in_use: use git_env_bool() X-Git-Tag: v2.13.0-rc0~57^2 X-Git-Url: http://git.bitbasher.net/?a=commitdiff_plain;h=df2a6e38b7e192c32d1df4b10cc278c2a66fb6a0;p=git.git pager_in_use: use git_env_bool() 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 Signed-off-by: Junio C Hamano --- diff --git a/pager.c b/pager.c index ae79643363..ec85fdf4c6 100644 --- 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); } /*