summaryrefslogtreecommitdiff
path: root/pager.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-31 22:38:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-31 22:38:57 (GMT)
commit7b7c10bf5e38ca8fe06ab80b073408e1dc6761d7 (patch)
tree71f3cdad993d78ee6edb6301ef72a73a3782653b /pager.c
parent0bb71fb36d60902a2efffd7e6df1cc821884e67c (diff)
parent9e9de18f1ad39901a8f0c67f0af70d66d427e326 (diff)
downloadgit-7b7c10bf5e38ca8fe06ab80b073408e1dc6761d7.zip
git-7b7c10bf5e38ca8fe06ab80b073408e1dc6761d7.tar.gz
git-7b7c10bf5e38ca8fe06ab80b073408e1dc6761d7.tar.bz2
Merge branch 'jk/fix-alias-pager-config-key-warnings'
Because the configuration system does not allow "alias.0foo" and "pager.0foo" as the configuration key, the user cannot use '0foo' as a custom command name anyway, but "git 0foo" tried to look these keys up and emitted useless warnings before saying '0foo is not a git command'. These warning messages have been squelched. * jk/fix-alias-pager-config-key-warnings: config: silence warnings for command names with invalid keys
Diffstat (limited to 'pager.c')
-rw-r--r--pager.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pager.c b/pager.c
index 070dc11..27d4c8a 100644
--- a/pager.c
+++ b/pager.c
@@ -150,7 +150,8 @@ int check_pager_config(const char *cmd)
struct strbuf key = STRBUF_INIT;
const char *value = NULL;
strbuf_addf(&key, "pager.%s", cmd);
- if (!git_config_get_value(key.buf, &value)) {
+ if (git_config_key_is_valid(key.buf) &&
+ !git_config_get_value(key.buf, &value)) {
int b = git_config_maybe_bool(key.buf, value);
if (b >= 0)
want = b;