From c648d4a8aac447120aed623cd1606fddeb435800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Tue, 2 Oct 2012 12:05:09 +0200 Subject: [PATCH] remote: don't auto-follow tags on an unamed remote An unnamed remote is used for commands like git fetch git://host/repo where no tags should be downloaded. Make this the default. --- src/remote.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/remote.c b/src/remote.c index 7c7790bfc..0878dab7a 100644 --- a/src/remote.c +++ b/src/remote.c @@ -86,6 +86,11 @@ int git_remote_new(git_remote **out, git_repository *repo, const char *name, con goto on_error; } + /* A remote without a name doesn't download tags */ + if (!name) { + remote->download_tags = GIT_REMOTE_DOWNLOAD_TAGS_NONE; + } + *out = remote; return 0;