@matheusbsbs / matheus-bagliano / commits / b6abb48a15
Fork 0

Don't bother passing ref log details to walker in builtin-fetch

When using the walker API within builtin-fetch we don't allow it to update refs locally; instead that action is reserved for builtin-fetch's own main loop once the objects have actually been downloaded. Passing NULL here will bypass the unnecessary malloc/free of a string buffer within the walker API. That buffer is never used because the prior argument (the refs to update) is also NULL. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Shawn O. Pearce committed Sep 15, 2007 at 03:23 UTC b6abb48a152879259ab59f6e470e62b59562d712
1 file changed +1 -1
transport.c
+1 -1
@@ -26,7 +26,7 @@ static int fetch_objs_via_walker(struct transport *transport,
26 for (i = 0; i < nr_objs; i++)
27 objs[i] = xstrdup(sha1_to_hex(to_fetch[i]->old_sha1));
28
29 - if (walker_fetch(walker, nr_objs, objs, NULL, dest))
29 + if (walker_fetch(walker, nr_objs, objs, NULL, NULL))
30 die("Fetch failed.");
31
32 for (i = 0; i < nr_objs; i++)