Skip to content

Commit df2a6e3

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8624735 commit df2a6e3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pager.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@ void setup_pager(void)
166166

167167
int pager_in_use(void)
168168
{
169-
const char *env;
170-
env = getenv("GIT_PAGER_IN_USE");
171-
return env ? git_config_bool("GIT_PAGER_IN_USE", env) : 0;
169+
return git_env_bool("GIT_PAGER_IN_USE", 0);
172170
}
173171

174172
/*

0 commit comments

Comments
 (0)