summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2012-10-02 12:05:09 +0200
committerCarlos Martín Nieto <cmn@elego.de>2012-10-02 13:09:18 +0200
commitc648d4a8aac447120aed623cd1606fddeb435800 (patch)
treee2fd91dc2da765c9d701b69014370ec8a914983d
parent218c88a968eb983261920465105c698aaacacaaf (diff)
downloadlibgit2-c648d4a8aac447120aed623cd1606fddeb435800.tar.gz
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.
-rw-r--r--src/remote.c5
1 files changed, 5 insertions, 0 deletions
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;