Merge branch 'sb/parse-hide-refs-config-cleanup'
Code clean-up. * sb/parse-hide-refs-config-cleanup: refs: parse_hide_refs_config to use parse_config_key
This commit is contained in:
7
refs.c
7
refs.c
@ -1035,10 +1035,11 @@ static struct string_list *hide_refs;
|
|||||||
|
|
||||||
int parse_hide_refs_config(const char *var, const char *value, const char *section)
|
int parse_hide_refs_config(const char *var, const char *value, const char *section)
|
||||||
{
|
{
|
||||||
|
const char *subsection, *key;
|
||||||
|
int subsection_len;
|
||||||
if (!strcmp("transfer.hiderefs", var) ||
|
if (!strcmp("transfer.hiderefs", var) ||
|
||||||
/* NEEDSWORK: use parse_config_key() once both are merged */
|
(!parse_config_key(var, section, &subsection, &subsection_len, &key)
|
||||||
(starts_with(var, section) && var[strlen(section)] == '.' &&
|
&& !subsection && !strcmp(key, "hiderefs"))) {
|
||||||
!strcmp(var + strlen(section), ".hiderefs"))) {
|
|
||||||
char *ref;
|
char *ref;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user