parse_hide_refs_config: tell parse_config_key we don't want a subsection
authorJeff King <peff@peff.net>
Fri, 24 Feb 2017 21:08:16 +0000 (16:08 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 24 Feb 2017 21:22:12 +0000 (13:22 -0800)
This lets us avoid declaring some otherwise useless
variables.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c
diff --git a/refs.c b/refs.c
index 92f800e9cd64ab9c6200b221069550cebc6be1af..cb812455791ab66f2a3d726d5a609726d338dadf 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -1029,11 +1029,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;