@ -107,10 +107,8 @@ static void add_merge_config(struct ref **head,
* there is no entry in the resulting FETCH_HEAD marked
* there is no entry in the resulting FETCH_HEAD marked
* for merging.
* for merging.
*/
*/
memset(&refspec, 0, sizeof(refspec));
refspec.src = branch->merge[i]->src;
refspec.src = branch->merge[i]->src;
refspec.dst = NULL;
refspec.pattern = 0;
refspec.force = 0;
get_fetch_map(remote_refs, &refspec, tail, 1);
get_fetch_map(remote_refs, &refspec, tail, 1);
for (rm = *old_tail; rm; rm = rm->next)
for (rm = *old_tail; rm; rm = rm->next)
rm->merge = 1;
rm->merge = 1;
@ -391,9 +389,10 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
fputc(url[i], fp);
fputc(url[i], fp);
fputc('\n', fp);
fputc('\n', fp);
if (ref)
if (ref) {
rc |= update_local_ref(ref, what, note);
rc |= update_local_ref(ref, what, note);
else
free(ref);
} else
sprintf(note, "* %-*s %-*s -> FETCH_HEAD",
sprintf(note, "* %-*s %-*s -> FETCH_HEAD",
TRANSPORT_SUMMARY_WIDTH, *kind ? kind : "branch",
TRANSPORT_SUMMARY_WIDTH, *kind ? kind : "branch",
REFCOL_WIDTH, *what ? what : "HEAD");
REFCOL_WIDTH, *what ? what : "HEAD");
@ -590,7 +589,7 @@ static void find_non_local_tags(struct transport *transport,
* to fetch then we can mark the ref entry in the list
* to fetch then we can mark the ref entry in the list
* as one to ignore by setting util to NULL.
* as one to ignore by setting util to NULL.
*/
*/
if (!strcmp(ref->name + strlen(ref->name) - 3, "^{}")) {
if (!suffixcmp(ref->name, "^{}")) {
if (item && !has_sha1_file(ref->old_sha1) &&
if (item && !has_sha1_file(ref->old_sha1) &&
!will_fetch(head, ref->old_sha1) &&
!will_fetch(head, ref->old_sha1) &&
!has_sha1_file(item->util) &&
!has_sha1_file(item->util) &&