From 7725499072aaf4d9093c615fee5a65d8477100bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Thu, 23 Apr 2015 06:51:34 +0200 Subject: 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. --- src/clone.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/clone.c') 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) -- cgit v1.2.1