summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2022-02-18 13:53:29 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-02-18 13:53:29 -0800
commit18636afdce5f272d79fe6c3036e4e74f69a0845a (patch)
tree5e2b6e66d9928aeb226dd5740dfab62802a3e8d1 /transport.c
parentMerge branch 'ab/hash-object-leakfix' (diff)
parentls-remote & transport API: release "struct transport_ls_refs_options" (diff)
downloadtgif-18636afdce5f272d79fe6c3036e4e74f69a0845a.tar.xz
Merge branch 'ab/release-transport-ls-refs-options'
* ab/release-transport-ls-refs-options: ls-remote & transport API: release "struct transport_ls_refs_options"
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/transport.c b/transport.c
index 2a3e324154..253d6671b1 100644
--- a/transport.c
+++ b/transport.c
@@ -1292,7 +1292,7 @@ int transport_push(struct repository *r,
&transport_options);
trace2_region_leave("transport_push", "get_refs_list", r);
- strvec_clear(&transport_options.ref_prefixes);
+ transport_ls_refs_options_release(&transport_options);
if (flags & TRANSPORT_PUSH_ALL)
match_flags |= MATCH_REFS_ALL;
@@ -1420,6 +1420,12 @@ const struct ref *transport_get_remote_refs(struct transport *transport,
return transport->remote_refs;
}
+void transport_ls_refs_options_release(struct transport_ls_refs_options *opts)
+{
+ strvec_clear(&opts->ref_prefixes);
+ free((char *)opts->unborn_head_target);
+}
+
int transport_fetch_refs(struct transport *transport, struct ref *refs)
{
int rc;