summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2010-08-31 16:24:24 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2010-08-31 16:24:24 -0700
commit381b2e76985de1c3670ec3c1938fef679c6eef17 (patch)
treed411abec9022feeead621d3e644681b194c53413 /builtin
parentMerge branch 'en/d-f-conflict-fix' (diff)
parentfetch: allow command line --tags to override config (diff)
downloadtgif-381b2e76985de1c3670ec3c1938fef679c6eef17.tar.xz
Merge branch 'dj/fetch-tagopt'
* dj/fetch-tagopt: fetch: allow command line --tags to override config
Diffstat (limited to 'builtin')
-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);