Ensure tail pointer gets setup correctly when we fetch HEAD only
authorShawn O. Pearce <spearce@spearce.org>
Mon, 3 Mar 2008 02:34:51 +0000 (21:34 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 3 Mar 2008 08:05:45 +0000 (00:05 -0800)
If we ever decided to append onto the end of this list the tail
pointer must be looking at the right memory cell at the end of
the HEAD ref_map.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fetch.c

index 1348a0e952fd2ff7ad9b05995c030708e6045723..5bce20f94f300e6ce1c96bf5971a4cfd4408f0ff 100644 (file)
@@ -157,6 +157,7 @@ static struct ref *get_ref_map(struct transport *transport,
                        if (!ref_map)
                                die("Couldn't find remote ref HEAD");
                        ref_map->merge = 1;
+                       tail = &ref_map->next;
                }
        }
        ref_remove_duplicates(ref_map);