Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
fetch-pack.c: inline insert_alternate_refs()
author
Michael Haggerty
<mhagger@alum.mit.edu>
Sat, 11 Feb 2012 06:20:58 +0000
(07:20 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 13 Feb 2012 03:50:39 +0000
(19:50 -0800)
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>
builtin/fetch-pack.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
65385ef
)
diff --git
a/builtin/fetch-pack.c
b/builtin/fetch-pack.c
index 9bd209622930dbf5caeb5be068e82da3317ccd47..dbe9acbc396919eba2e6b5fa6633f6839d15b0c8 100644
(file)
--- a/
builtin/fetch-pack.c
+++ b/
builtin/fetch-pack.c
@@
-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
@@
-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) {