summaryrefslogtreecommitdiff
path: root/src/clone.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2014-06-06 15:01:45 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2014-09-30 15:42:32 +0200
commit3f8942052306a9d62521bdb6e6d5e7636bc5526e (patch)
tree739988344f450431fec435e2dfde626c75493ec2 /src/clone.c
parenta2a23322193eeca5d2912c0b74c5374f8ec21737 (diff)
downloadlibgit2-3f8942052306a9d62521bdb6e6d5e7636bc5526e.tar.gz
remote: allow overriding the refspecs for download and fetch
With opportunistic ref updates, git has introduced the concept of having base refspecs *and* refspecs that are active for a particular fetch. Let's start by letting the user override the refspecs for download.
Diffstat (limited to 'src/clone.c')
-rw-r--r--src/clone.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/clone.c b/src/clone.c
index 43b839003..f18f07611 100644
--- a/src/clone.c
+++ b/src/clone.c
@@ -358,7 +358,7 @@ static int clone_into(git_repository *repo, git_remote *_remote, const git_check
git_remote_set_update_fetchhead(remote, 0);
git_buf_printf(&reflog_message, "clone: from %s", git_remote_url(remote));
- if ((error = git_remote_fetch(remote, signature, git_buf_cstr(&reflog_message))) != 0)
+ if ((error = git_remote_fetch(remote, NULL, signature, git_buf_cstr(&reflog_message))) != 0)
goto cleanup;
error = checkout_branch(repo, remote, co_opts, branch, signature, git_buf_cstr(&reflog_message));
@@ -553,7 +553,7 @@ static int clone_local_into(git_repository *repo, git_remote *remote, const git_
git_buf_printf(&reflog_message, "clone: from %s", git_remote_url(remote));
- if ((error = git_remote_fetch(remote, signature, git_buf_cstr(&reflog_message))) != 0)
+ if ((error = git_remote_fetch(remote, NULL, signature, git_buf_cstr(&reflog_message))) != 0)
goto cleanup;
error = checkout_branch(repo, remote, co_opts, branch, signature, git_buf_cstr(&reflog_message));