Skip to content

Commit

Permalink
Don't bother passing ref log details to walker in builtin-fetch
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce authored and Junio C Hamano committed Sep 19, 2007
1 parent 3278cd0 commit b6abb48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit b6abb48

Please sign in to comment.