Merge branch 'maint'
* maint: Update draft release notes to 1.7.0.3 fetch: Fix minor memory leak fetch: Future-proof initialization of a refspec on stack fetch: Check for a "^{}" suffix with suffixcmp() daemon: parse_host_and_port SIGSEGV if port is specified Makefile: Fix CDPATH problem pull: replace unnecessary sed invocation
This commit is contained in:
@ -107,10 +107,8 @@ static void add_merge_config(struct ref **head,
|
||||
* there is no entry in the resulting FETCH_HEAD marked
|
||||
* for merging.
|
||||
*/
|
||||
memset(&refspec, 0, sizeof(refspec));
|
||||
refspec.src = branch->merge[i]->src;
|
||||
refspec.dst = NULL;
|
||||
refspec.pattern = 0;
|
||||
refspec.force = 0;
|
||||
get_fetch_map(remote_refs, &refspec, tail, 1);
|
||||
for (rm = *old_tail; rm; rm = rm->next)
|
||||
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('\n', fp);
|
||||
|
||||
if (ref)
|
||||
if (ref) {
|
||||
rc |= update_local_ref(ref, what, note);
|
||||
else
|
||||
free(ref);
|
||||
} else
|
||||
sprintf(note, "* %-*s %-*s -> FETCH_HEAD",
|
||||
TRANSPORT_SUMMARY_WIDTH, *kind ? kind : "branch",
|
||||
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
|
||||
* 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) &&
|
||||
!will_fetch(head, ref->old_sha1) &&
|
||||
!has_sha1_file(item->util) &&
|
||||
|
Reference in New Issue
Block a user