X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-fetch.c;h=f6584ecea165704208059b632bb1a1ac2b6a6d1f;hb=f0abea652bf90c5a081f07e35c4a656143e0ec50;hp=e56617e32e5f878e1ae9f0d94ceced28ba18a94e;hpb=a064ac1bc3f13103f92ae198da7fc44a1452c89d;p=git.git diff --git a/builtin-fetch.c b/builtin-fetch.c index e56617e32..f6584ecea 100644 --- a/builtin-fetch.c +++ b/builtin-fetch.c @@ -508,10 +508,8 @@ static void find_non_local_tags(struct transport *transport, will_fetch(head, ref->old_sha1))) { path_list_insert(ref_name, &new_refs); - rm = alloc_ref(strlen(ref_name) + 1); - strcpy(rm->name, ref_name); - rm->peer_ref = alloc_ref(strlen(ref_name) + 1); - strcpy(rm->peer_ref->name, ref_name); + rm = alloc_ref_from_str(ref_name); + rm->peer_ref = alloc_ref_from_str(ref_name); hashcpy(rm->old_sha1, ref_sha1); **tail = rm;