Merge branch 'jt/fetch-no-redundant-tag-fetch-map'
authorJunio C Hamano <gitster@pobox.com>
Tue, 10 Jan 2017 23:24:23 +0000 (15:24 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Jan 2017 23:24:23 +0000 (15:24 -0800)
Code cleanup to avoid using redundant refspecs while fetching with
the --tags option.

* jt/fetch-no-redundant-tag-fetch-map:
fetch: do not redundantly calculate tag refmap

builtin/fetch.c
index fc74c8471cec5d1d1855c7d4362e465e44259e6c..f1570e346434e8695e80ba568c28b1363b2c0cb5 100644 (file)
@@ -359,9 +359,6 @@ static struct ref *get_ref_map(struct transport *transport,
 
                for (i = 0; i < fetch_refspec_nr; i++)
                        get_fetch_map(ref_map, &fetch_refspec[i], &oref_tail, 1);
-
-               if (tags == TAGS_SET)
-                       get_fetch_map(remote_refs, tag_refspec, &tail, 0);
        } else if (refmap_array) {
                die("--refmap option is only meaningful with command-line refspec(s).");
        } else {