transport-helper: Use capname for refspec capability too
[gitweb.git] / transport-helper.c
index 0c00be9dc7a12645242008a3ad869c0cb3f63caf..0cfc9ae9059ce121b567406d7941b71cd54b961c 100644 (file)
@@ -181,7 +181,7 @@ static struct child_process *get_helper(struct transport *transport)
                        ALLOC_GROW(refspecs,
                                   refspec_nr + 1,
                                   refspec_alloc);
-                       refspecs[refspec_nr++] = strdup(buf.buf + strlen("refspec "));
+                       refspecs[refspec_nr++] = strdup(capname + strlen("refspec "));
                } else if (!strcmp(capname, "connect")) {
                        data->connect = 1;
                } else if (mandatory) {