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
This commit is contained in:
6
refs.c
6
refs.c
@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user