]> git.ipfire.org Git - thirdparty/git.git/commitdiff
transport: rename "fetch" in transport_vtable to "fetch_refs"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 5 Aug 2021 01:25:35 +0000 (03:25 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Aug 2021 15:59:36 +0000 (08:59 -0700)
Rename the "fetch" member of the transport_vtable to "fetch_refs" for
consistency with the existing "push_refs". Neither of them just push
"refs" but refs and objects, but having the two match makes the code
more readable than having it be inconsistent, especially since
"fetch_refs" is a lot easier to grep for than "fetch".

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport-helper.c
transport-internal.h
transport.c

index 4be035edb8b7c6d618b4dc78ea5de203a2831391..8d445a8f3ee38bb835bfa84eb834727fbee8b375 100644 (file)
@@ -671,8 +671,8 @@ static int connect_helper(struct transport *transport, const char *name,
 static struct ref *get_refs_list_using_list(struct transport *transport,
                                            int for_push);
 
-static int fetch(struct transport *transport,
-                int nr_heads, struct ref **to_fetch)
+static int fetch_refs(struct transport *transport,
+                     int nr_heads, struct ref **to_fetch)
 {
        struct helper_data *data = transport->data;
        int i, count;
@@ -681,7 +681,7 @@ static int fetch(struct transport *transport,
 
        if (process_connect(transport, 0)) {
                do_take_over(transport);
-               return transport->vtable->fetch(transport, nr_heads, to_fetch);
+               return transport->vtable->fetch_refs(transport, nr_heads, to_fetch);
        }
 
        /*
@@ -1263,7 +1263,7 @@ static struct ref *get_refs_list_using_list(struct transport *transport,
 static struct transport_vtable vtable = {
        set_helper_option,
        get_refs_list,
-       fetch,
+       fetch_refs,
        push_refs,
        connect_helper,
        release_helper
index b60f1ba9077d09c5f0c3259fe5bc86c5facdbc78..c4ca0b733acbdbe7fc7a5906490e396240ec7b06 100644 (file)
@@ -34,7 +34,7 @@ struct transport_vtable {
         * get_refs_list(), it should set the old_sha1 fields in the
         * provided refs now.
         **/
-       int (*fetch)(struct transport *transport, int refs_nr, struct ref **refs);
+       int (*fetch_refs)(struct transport *transport, int refs_nr, struct ref **refs);
 
        /**
         * Push the objects and refs. Send the necessary objects, and
index 17e9629710a2f8053c2657be91425b1aab840991..3e8a27b03210fc8fdb0cd792a51893aac7991ea5 100644 (file)
@@ -1453,7 +1453,7 @@ int transport_fetch_refs(struct transport *transport, struct ref *refs)
                        heads[nr_heads++] = rm;
        }
 
-       rc = transport->vtable->fetch(transport, nr_heads, heads);
+       rc = transport->vtable->fetch_refs(transport, nr_heads, heads);
 
        free(heads);
        return rc;