Convert the refspecs in transport-helper.c to be stored in a
'struct refspec'.
Signed-off-by: Brandon Williams <bmwill@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Brandon Williams7 years agocommitted byJunio C Hamano
} else if (data->import || data->bidi_import || data->export) {
if (!data->rs.nr && (data->import || data->bidi_import || data->export)) {
warning("This remote helper should implement refspec capability.");
}
strbuf_release(&buf);
@ -378,8 +365,7 @@ static int release_helper(struct transport *transport)
@@ -378,8 +365,7 @@ static int release_helper(struct transport *transport)
{
int res = 0;
struct helper_data *data = transport->data;
free_refspec(data->refspec_nr, data->refspecs);
data->refspecs = NULL;
refspec_clear(&data->rs);
res = disconnect_helper(transport);
free(transport->data);
return res;
@ -536,8 +522,8 @@ static int fetch_with_import(struct transport *transport,
@@ -536,8 +522,8 @@ static int fetch_with_import(struct transport *transport,
update_ref("update by helper", private, &ref->new_oid, NULL,
@ -939,7 +925,7 @@ static int push_refs_with_export(struct transport *transport,
@@ -939,7 +925,7 @@ static int push_refs_with_export(struct transport *transport,
@ -956,7 +942,7 @@ static int push_refs_with_export(struct transport *transport,
@@ -956,7 +942,7 @@ static int push_refs_with_export(struct transport *transport,