submodule sync: skip work for inactive submodules
[gitweb.git] / refs.c
diff --git a/refs.c b/refs.c
index 6d0961921b25d2296195bddb3666b6537b0e0fb2..4d6bf9237b5947c93dd366ccc1511f2a73649ae6 100644 (file)
--- a/refs.c
+++ b/refs.c
@@ -1035,10 +1035,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;