diff --git a/builtin-fetch.c b/builtin-fetch.c
index 26c3d74b76de701a8e1a5e0c7031751599c1487f..55f611e3c26e55df43eca1f40df74d335c850cc0 100644 (file)
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
read_ref(rm->peer_ref->name, rm->peer_ref->old_sha1);
}
+ if (tags == TAGS_DEFAULT && autotags)
+ transport_set_option(transport, TRANS_OPT_FOLLOWTAGS, "1");
if (fetch_refs(transport, ref_map)) {
free_refs(ref_map);
return 1;
ref_map = NULL;
find_non_local_tags(transport, &ref_map, &tail);
if (ref_map) {
+ transport_set_option(transport, TRANS_OPT_FOLLOWTAGS, NULL);
transport_set_option(transport, TRANS_OPT_DEPTH, "0");
fetch_refs(transport, ref_map);
}