{"thread":{"id":"9858","subject":"[PATCH 2/5] Don't bother passing ref log details to walker in builtin-fetch","startedAt":"2007-09-15T07:23:04Z","lastAt":"2007-09-15T07:23:04Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"53094","messageId":"20070915072304.GB20346@spearce.org","threadId":"9858","inReplyTo":null,"subject":"[PATCH 2/5] Don't bother passing ref log details to walker in builtin-fetch","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-09-15T07:23:04Z","receivedAt":"2007-09-15T07:23:04Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"When using the walker API within builtin-fetch we don't allow\nit to update refs locally; instead that action is reserved for\nbuiltin-fetch's own main loop once the objects have actually\nbeen downloaded.\n\nPassing NULL here will bypass the unnecessary malloc/free of a\nstring buffer within the walker API.  That buffer is never used\nbecause the prior argument (the refs to update) is also NULL.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n transport.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/transport.c b/transport.c\nindex 0338ed4..0021190 100644\n--- a/transport.c\n+++ b/transport.c\n@@ -26,7 +26,7 @@ static int fetch_objs_via_walker(struct transport *transport,\n \tfor (i = 0; i < nr_objs; i++)\n \t\tobjs[i] = xstrdup(sha1_to_hex(to_fetch[i]->old_sha1));\n \n-\tif (walker_fetch(walker, nr_objs, objs, NULL, dest))\n+\tif (walker_fetch(walker, nr_objs, objs, NULL, NULL))\n \t\tdie(\"Fetch failed.\");\n \n \tfor (i = 0; i < nr_objs; i++)\n-- \n1.5.3.1.84.gaf82-dirty\n"}]}