Merge branch 'jk/parse-config-key-cleanup'

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
This commit is contained in:
Junio C Hamano
2017-03-10 13:24:22 -08:00
3 changed files with 16 additions and 11 deletions

7
refs.c
View File

@ -1035,11 +1035,10 @@ static struct string_list *hide_refs;
int parse_hide_refs_config(const char *var, const char *value, const char *section)
{
const char *subsection, *key;
int subsection_len;
const char *key;
if (!strcmp("transfer.hiderefs", var) ||
(!parse_config_key(var, section, &subsection, &subsection_len, &key)
&& !subsection && !strcmp(key, "hiderefs"))) {
(!parse_config_key(var, section, NULL, NULL, &key) &&
!strcmp(key, "hiderefs"))) {
char *ref;
int len;