summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2010-08-31 16:24:24 -0700
committerJunio C Hamano <gitster@pobox.com>2010-08-31 16:24:24 -0700
commit381b2e76985de1c3670ec3c1938fef679c6eef17 (patch)
treed411abec9022feeead621d3e644681b194c53413 /builtin/fetch.c
parent3f29dd6c2344c56aad263a82a773ead0d9fded30 (diff)
parented36854651303dd18156786fc096de611f43912c (diff)
downloadgit-381b2e76985de1c3670ec3c1938fef679c6eef17.tar.gz
Merge branch 'dj/fetch-tagopt'
* dj/fetch-tagopt: fetch: allow command line --tags to override config
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index ea14d5dc6b..fab3fce512 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -659,10 +659,12 @@ static int do_fetch(struct transport *transport,
for_each_ref(add_existing, &existing_refs);
- if (transport->remote->fetch_tags == 2 && tags != TAGS_UNSET)
- tags = TAGS_SET;
- if (transport->remote->fetch_tags == -1)
- tags = TAGS_UNSET;
+ if (tags == TAGS_DEFAULT) {
+ if (transport->remote->fetch_tags == 2)
+ tags = TAGS_SET;
+ if (transport->remote->fetch_tags == -1)
+ tags = TAGS_UNSET;
+ }
if (!transport->get_refs_list || !transport->fetch)
die("Don't know how to fetch from %s", transport->url);