Skip to content

Commit

Permalink
fetch-pack.c: inline insert_alternate_refs()
Browse files Browse the repository at this point in the history
The logic of the (single) caller is clearer without encapsulating this
one line in a function.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Michael Haggerty authored and Junio C Hamano committed Feb 13, 2012
1 parent 65385ef commit c41a802
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions builtin/fetch-pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,6 @@ static void insert_one_alternate_ref(const struct ref *ref, void *unused)
rev_list_insert_ref(NULL, ref->old_sha1, 0, NULL);
}

static void insert_alternate_refs(void)
{
for_each_alternate_ref(insert_one_alternate_ref, NULL);
}

#define INITIAL_FLUSH 16
#define PIPESAFE_FLUSH 32
#define LARGE_FLUSH 1024
Expand Down Expand Up @@ -295,7 +290,7 @@ static int find_common(int fd[2], unsigned char *result_sha1,
marked = 1;

for_each_ref(rev_list_insert_ref, NULL);
insert_alternate_refs();
for_each_alternate_ref(insert_one_alternate_ref, NULL);

fetching = 0;
for ( ; refs ; refs = refs->next) {
Expand Down

0 comments on commit c41a802

Please sign in to comment.