From: Shawn O. Pearce Date: Sat, 15 Sep 2007 07:23:04 +0000 (-0400) Subject: Don't bother passing ref log details to walker in builtin-fetch X-Git-Tag: v1.5.4-rc0~292^2~49 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b6abb48a152879259ab59f6e470e62b59562d712;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/transport.c b/transport.c index 0338ed45b..002119061 100644 --- a/transport.c +++ b/transport.c @@ -26,7 +26,7 @@ static int fetch_objs_via_walker(struct transport *transport, for (i = 0; i < nr_objs; i++) objs[i] = xstrdup(sha1_to_hex(to_fetch[i]->old_sha1)); - if (walker_fetch(walker, nr_objs, objs, NULL, dest)) + if (walker_fetch(walker, nr_objs, objs, NULL, NULL)) die("Fetch failed."); for (i = 0; i < nr_objs; i++)