Merge branch 'dj/fetch-tagopt'

* dj/fetch-tagopt:
  fetch: allow command line --tags to override config
This commit is contained in:
Junio C Hamano
2010-08-31 16:24:24 -07:00
4 changed files with 56 additions and 7 deletions

View File

@ -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);