diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-28 13:52:18 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-28 13:52:19 -0700 |
commit | c772d1bcdc058d655e6cd3518440a721433cb511 (patch) | |
tree | b9712dd52d14728c5c23fa83a49f95dab49324f9 /refs.c | |
parent | 8f9aeb0d36c6cbfb849946bb272fa0d3c4611547 (diff) | |
parent | ad8c7cdadd96c66d0adf894250c8f4dd77bb2bee (diff) | |
download | git-c772d1bcdc058d655e6cd3518440a721433cb511.tar.gz |
Merge branch 'jk/parse-config-key-cleanup' into maint
The "parse_config_key()" API function has been cleaned up.
* jk/parse-config-key-cleanup:
parse_hide_refs_config: tell parse_config_key we don't want a subsection
parse_config_key: allow matching single-level config
parse_config_key: use skip_prefix instead of starts_with
refs: parse_hide_refs_config to use parse_config_key
Diffstat (limited to 'refs.c')
-rw-r--r-- | refs.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1034,10 +1034,10 @@ static struct string_list *hide_refs; int parse_hide_refs_config(const char *var, const char *value, const char *section) { + const char *key; if (!strcmp("transfer.hiderefs", var) || - /* NEEDSWORK: use parse_config_key() once both are merged */ - (starts_with(var, section) && var[strlen(section)] == '.' && - !strcmp(var + strlen(section), ".hiderefs"))) { + (!parse_config_key(var, section, NULL, NULL, &key) && + !strcmp(key, "hiderefs"))) { char *ref; int len; |