X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-fetch.c;h=f6584ecea165704208059b632bb1a1ac2b6a6d1f;hb=adf59ec127f447aa83c84f9dbe2ae4e6417f3760;hp=167f948036170fd2ec5a8e3bd3ca20359d8c9ee5;hpb=3e08f5db65bcfe3ad238ee0de1cac2da84953cf3;p=git.git diff --git a/builtin-fetch.c b/builtin-fetch.c index 167f94803..f6584ecea 100644 --- a/builtin-fetch.c +++ b/builtin-fetch.c @@ -360,12 +360,10 @@ static int store_updated_refs(const char *url, struct ref *ref_map) if (ref) update_local_ref(ref, what, verbose, note); - else if (verbose) + else sprintf(note, "* %-*s %-*s -> FETCH_HEAD", SUMMARY_WIDTH, *kind ? kind : "branch", REFCOL_WIDTH, *what ? what : "HEAD"); - else - *note = '\0'; if (*note) { if (!shown_url) { fprintf(stderr, "From %.*s\n", @@ -510,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;