X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=transport-helper.c;h=acfc88e3f1f0e99863512bf2c6ea82f1283cc35d;hb=fd5c363da4635d81f29193ae19d8fa7b5657ab39;hp=0381de536846e6fef958ece86f07bbc5b4cf7e09;hpb=262657dce61b417d712a7f4cd85ff8ff4c6ec3a4;p=git.git diff --git a/transport-helper.c b/transport-helper.c index 0381de536..acfc88e3f 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -689,7 +689,7 @@ static int push_refs_with_export(struct transport *transport, struct child_process *helper, exporter; struct helper_data *data = transport->data; char *export_marks = NULL, *import_marks = NULL; - struct string_list revlist_args = { NULL, 0, 0 }; + struct string_list revlist_args = STRING_LIST_INIT_NODUP; struct strbuf buf = STRBUF_INIT; helper = get_helper(transport); @@ -727,10 +727,10 @@ static int push_refs_with_export(struct transport *transport, private = apply_refspecs(data->refspecs, data->refspec_nr, ref->name); if (private && !get_sha1(private, sha1)) { strbuf_addf(&buf, "^%s", private); - string_list_append(strbuf_detach(&buf, NULL), &revlist_args); + string_list_append(&revlist_args, strbuf_detach(&buf, NULL)); } - string_list_append(ref->name, &revlist_args); + string_list_append(&revlist_args, ref->name); }