summaryrefslogtreecommitdiff
path: root/src/clone.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-04-23 06:51:34 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-05-13 09:46:36 +0200
commit7725499072aaf4d9093c615fee5a65d8477100bc (patch)
treefc68cffcafe2d9e762729334dfe2f7a4ee15783e /src/clone.c
parent3fec548a989b09fc7a2c30f42b1d4fa123a8867e (diff)
downloadlibgit2-7725499072aaf4d9093c615fee5a65d8477100bc.tar.gz
remote: remove live changing of refspecs
The base refspecs changing can be a cause of confusion as to what is the current base refspec set and complicate saving the remote's configuration. Change `git_remote_add_{fetch,push}()` to update the configuration instead of an instance. This finally makes `git_remote_save()` a no-op, it will be removed in a later commit.
Diffstat (limited to 'src/clone.c')
-rw-r--r--src/clone.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/clone.c b/src/clone.c
index 7dcbb8a1d..c44cf599f 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -341,11 +341,9 @@ static int clone_into(git_repository *repo, git_remote *_remote, const git_fetch
if ((error = git_remote_dup(&remote, _remote)) < 0)
return error;
- if ((error = git_remote_add_fetch(remote, "refs/tags/*:refs/tags/*")) < 0)
- goto cleanup;
-
memcpy(&fetch_opts, opts, sizeof(git_fetch_options));
fetch_opts.update_fetchhead = 0;
+ fetch_opts.download_tags = GIT_REMOTE_DOWNLOAD_TAGS_ALL;
git_buf_printf(&reflog_message, "clone: from %s", git_remote_url(remote));
if ((error = git_remote_fetch(remote, NULL, &fetch_opts, git_buf_cstr(&reflog_message))) != 0)