X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-fetch.c;h=e81ee2d02b588c83f9ac355d20559271be73871d;hb=e46f9c8161a0df4d4b9f8c8a98b1a8c0d9452cfd;hp=f6584ecea165704208059b632bb1a1ac2b6a6d1f;hpb=c01cdde1862bc53182b000700462e1119528061e;p=git.git diff --git a/builtin-fetch.c b/builtin-fetch.c index f6584ecea..e81ee2d02 100644 --- a/builtin-fetch.c +++ b/builtin-fetch.c @@ -127,14 +127,8 @@ static struct ref *get_ref_map(struct transport *transport, /* Merge everything on the command line, but not --tags */ for (rm = ref_map; rm; rm = rm->next) rm->merge = 1; - if (tags == TAGS_SET) { - struct refspec refspec; - refspec.src = "refs/tags/"; - refspec.dst = "refs/tags/"; - refspec.pattern = 1; - refspec.force = 0; - get_fetch_map(remote_refs, &refspec, &tail, 0); - } + if (tags == TAGS_SET) + get_fetch_map(remote_refs, tag_refspec, &tail, 0); } else { /* Use the defaults */ struct remote *remote = transport->remote; @@ -292,7 +286,7 @@ static int store_updated_refs(const char *url, struct ref *ref_map) { FILE *fp; struct commit *commit; - int url_len, i, note_len, shown_url = 0; + int url_len, i, note_len, shown_url = 0, rc = 0; char note[1024]; const char *what, *kind; struct ref *rm; @@ -359,7 +353,7 @@ static int store_updated_refs(const char *url, struct ref *ref_map) note); if (ref) - update_local_ref(ref, what, verbose, note); + rc |= update_local_ref(ref, what, verbose, note); else sprintf(note, "* %-*s %-*s -> FETCH_HEAD", SUMMARY_WIDTH, *kind ? kind : "branch", @@ -374,7 +368,7 @@ static int store_updated_refs(const char *url, struct ref *ref_map) } } fclose(fp); - return 0; + return rc; } /*