Skip to content

Commit c41a802

Browse files
mhaggergitster
authored andcommitted
fetch-pack.c: inline insert_alternate_refs()
The logic of the (single) caller is clearer without encapsulating this one line in a function. Signed-off-by: Michael Haggerty <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 65385ef commit c41a802

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

builtin/fetch-pack.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,6 @@ static void insert_one_alternate_ref(const struct ref *ref, void *unused)
256256
rev_list_insert_ref(NULL, ref->old_sha1, 0, NULL);
257257
}
258258

259-
static void insert_alternate_refs(void)
260-
{
261-
for_each_alternate_ref(insert_one_alternate_ref, NULL);
262-
}
263-
264259
#define INITIAL_FLUSH 16
265260
#define PIPESAFE_FLUSH 32
266261
#define LARGE_FLUSH 1024
@@ -295,7 +290,7 @@ static int find_common(int fd[2], unsigned char *result_sha1,
295290
marked = 1;
296291

297292
for_each_ref(rev_list_insert_ref, NULL);
298-
insert_alternate_refs();
293+
for_each_alternate_ref(insert_one_alternate_ref, NULL);
299294

300295
fetching = 0;
301296
for ( ; refs ; refs = refs->next) {

0 commit comments

Comments
 (0)