summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorLibravatar Brandon Williams <bmwill@google.com>2018-03-15 10:31:23 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-03-15 12:01:08 -0700
commit1af8ae1cfa44a3f3c3f1efb7f9ebe68bc0ce7578 (patch)
treecaf98c45f10651c6b86ba2c6753716c0ee4ae2c7 /builtin/fetch.c
parenttransport: convert get_refs_list to take a list of ref prefixes (diff)
downloadtgif-1af8ae1cfa44a3f3c3f1efb7f9ebe68bc0ce7578.tar.xz
transport: convert transport_get_remote_refs to take a list of ref prefixes
Teach transport_get_remote_refs() to accept a list of ref prefixes, which will be sent to the server for use in filtering when using protocol v2. (This list will be ignored when not using protocol v2.) Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index 7bbcd26faf..850382f559 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -250,7 +250,7 @@ static void find_non_local_tags(struct transport *transport,
struct string_list_item *item = NULL;
for_each_ref(add_existing, &existing_refs);
- for (ref = transport_get_remote_refs(transport); ref; ref = ref->next) {
+ for (ref = transport_get_remote_refs(transport, NULL); ref; ref = ref->next) {
if (!starts_with(ref->name, "refs/tags/"))
continue;
@@ -336,7 +336,7 @@ static struct ref *get_ref_map(struct transport *transport,
/* opportunistically-updated references: */
struct ref *orefs = NULL, **oref_tail = &orefs;
- const struct ref *remote_refs = transport_get_remote_refs(transport);
+ const struct ref *remote_refs = transport_get_remote_refs(transport, NULL);
if (refspec_count) {
struct refspec *fetch_refspec;