summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/refs.c b/refs.c
index 9bd0bc177b..92f800e9cd 100644
--- a/refs.c
+++ b/refs.c
@@ -1029,10 +1029,11 @@ 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;
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, &subsection, &subsection_len, &key)
+ && !subsection && !strcmp(key, "hiderefs"))) {
char *ref;
int len;