summaryrefslogtreecommitdiff
path: root/builtin-fetch.c
diff options
context:
space:
mode:
authorDaniel Barkalow <barkalow@iabervon.org>2008-04-17 19:32:35 -0400
committerJunio C Hamano <gitster@pobox.com>2008-05-04 17:41:44 -0700
commite0aaa29ff324c40a6428d5cc26867392eedf94ad (patch)
treedcc53a8fdcdbb7b1ef493bd72f3197c72289683b /builtin-fetch.c
parentbef70b22ba63d71c1ae2e070e64ff9863ea1ad14 (diff)
downloadgit-e0aaa29ff324c40a6428d5cc26867392eedf94ad.tar.gz
Have a constant extern refspec for "--tags"
The refspec refs/tags/*:refs/tags/* is sufficiently common and generic to merit having a constant instead of generating it as needed. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-fetch.c')
-rw-r--r--builtin-fetch.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 167f948036..30aa42df6e 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;