From: Jeff King <peff@peff.net>
To: Per Cederqvist <cederp@opera.com>
Cc: git@vger.kernel.org
Subject: [PATCH 1/2] pager_in_use: use git_env_bool
Date: Mon, 10 Aug 2015 01:19:34 -0400 [thread overview]
Message-ID: <20150810051933.GA15441@sigill.intra.peff.net> (raw)
In-Reply-To: <20150810051901.GA9262@sigill.intra.peff.net>
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 <peff@peff.net>
---
| 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--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
next prev parent reply other threads:[~2015-08-10 5:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-03 15:21 "git pull --rebase" fails if pager.pull is true, after producing a colorized diff it cannot apply Per Cederqvist
2015-08-09 23:42 ` Jeff King
2015-08-10 5:19 ` Jeff King
2015-08-10 5:19 ` Jeff King [this message]
2015-08-10 5:23 ` [PATCH 2/2] pager_in_use: make sure output is still going to pager Jeff King
2015-08-10 16:38 ` Johannes Schindelin
2015-08-10 17:24 ` Jeff King
2015-08-11 7:48 ` Per Cederqvist
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150810051933.GA15441@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=cederp@opera.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).