diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-09-03 19:17:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-09-03 19:17:52 -0700 |
commit | fa6d3749edce0a5ba8c9150f984cc307e0092d0d (patch) | |
tree | 3ca97911ade88435507d1151fb5885087ccf7f55 /pager.c | |
parent | 0b2cef2805a02a9db4a3ba01004dd767af97c692 (diff) | |
parent | 9e9de18f1ad39901a8f0c67f0af70d66d427e326 (diff) | |
download | git-fa6d3749edce0a5ba8c9150f984cc307e0092d0d.tar.gz |
Merge branch 'jk/fix-alias-pager-config-key-warnings' into maint
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |