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 <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Feb 11, 2012 at 07:20 UTC
c41a802fe9593db67f458bde9f15f51fdf3f4f1a
1 file changed
+1
-6
builtin/fetch-pack.c
+1
-6
@@ -256,11 +256,6 @@ static void insert_one_alternate_ref(const struct ref *ref, void *unused)
256
rev_list_insert_ref(NULL, ref->old_sha1, 0, NULL);
257
}
258
259
-static void insert_alternate_refs(void)
260
-{
261
- for_each_alternate_ref(insert_one_alternate_ref, NULL);
262
-}
263
-
259
#define INITIAL_FLUSH 16
260
#define PIPESAFE_FLUSH 32
261
#define LARGE_FLUSH 1024
@@ -295,7 +290,7 @@ static int find_common(int fd[2], unsigned char *result_sha1,
290
marked = 1;
291
292
for_each_ref(rev_list_insert_ref, NULL);
298
- insert_alternate_refs();
293
+ for_each_alternate_ref(insert_one_alternate_ref, NULL);
294
295
fetching = 0;
296
for ( ; refs ; refs = refs->next) {