diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-09-01 13:52:10 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-09-01 13:52:10 -0700 |
commit | 6da28b4f87f80b560ae426e594640d61c437df14 (patch) | |
tree | da166ec7a157a34681d1170990b53c88bbe8f35d /builtin | |
parent | e917918335e660629007f3d2d07d3d9a019b5273 (diff) | |
parent | ed36854651303dd18156786fc096de611f43912c (diff) | |
download | git-6da28b4f87f80b560ae426e594640d61c437df14.tar.gz git-6da28b4f87f80b560ae426e594640d61c437df14.tar.xz |
Merge branch 'dj/fetch-tagopt' into maint
* dj/fetch-tagopt:
fetch: allow command line --tags to override config
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fetch.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index 1b67f5fda..7a5314415 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -675,10 +675,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); |