Skip to content

Commit 9b1cdd3

Browse files
avargitster
authored andcommitted
transport: rename "fetch" in transport_vtable to "fetch_refs"
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent eacf36a commit 9b1cdd3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

transport-helper.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,8 @@ static int connect_helper(struct transport *transport, const char *name,
671671
static struct ref *get_refs_list_using_list(struct transport *transport,
672672
int for_push);
673673

674-
static int fetch(struct transport *transport,
675-
int nr_heads, struct ref **to_fetch)
674+
static int fetch_refs(struct transport *transport,
675+
int nr_heads, struct ref **to_fetch)
676676
{
677677
struct helper_data *data = transport->data;
678678
int i, count;
@@ -681,7 +681,7 @@ static int fetch(struct transport *transport,
681681

682682
if (process_connect(transport, 0)) {
683683
do_take_over(transport);
684-
return transport->vtable->fetch(transport, nr_heads, to_fetch);
684+
return transport->vtable->fetch_refs(transport, nr_heads, to_fetch);
685685
}
686686

687687
/*
@@ -1263,7 +1263,7 @@ static struct ref *get_refs_list_using_list(struct transport *transport,
12631263
static struct transport_vtable vtable = {
12641264
set_helper_option,
12651265
get_refs_list,
1266-
fetch,
1266+
fetch_refs,
12671267
push_refs,
12681268
connect_helper,
12691269
release_helper

transport-internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct transport_vtable {
3434
* get_refs_list(), it should set the old_sha1 fields in the
3535
* provided refs now.
3636
**/
37-
int (*fetch)(struct transport *transport, int refs_nr, struct ref **refs);
37+
int (*fetch_refs)(struct transport *transport, int refs_nr, struct ref **refs);
3838

3939
/**
4040
* Push the objects and refs. Send the necessary objects, and

transport.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ int transport_fetch_refs(struct transport *transport, struct ref *refs)
14531453
heads[nr_heads++] = rm;
14541454
}
14551455

1456-
rc = transport->vtable->fetch(transport, nr_heads, heads);
1456+
rc = transport->vtable->fetch_refs(transport, nr_heads, heads);
14571457

14581458
free(heads);
14591459
return rc;

0 commit comments

Comments
 (0)