summaryrefslogtreecommitdiff
path: root/tests/online/clone.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/online/clone.c')
-rw-r--r--tests/online/clone.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/online/clone.c b/tests/online/clone.c
index 1d4196948..1930a8ba3 100644
--- a/tests/online/clone.c
+++ b/tests/online/clone.c
@@ -134,16 +134,9 @@ static int remote_mirror_cb(git_remote **out, git_repository *repo,
GIT_UNUSED(payload);
- if ((error = git_remote_create(&remote, repo, name, url)) < 0)
+ if ((error = git_remote_create_with_fetchspec(&remote, repo, name, url, "+refs/*:refs/*")) < 0)
return error;
- git_remote_clear_refspecs(remote);
-
- if ((error = git_remote_add_fetch(remote, "+refs/*:refs/*")) < 0) {
- git_remote_free(remote);
- return error;
- }
-
*out = remote;
return 0;
}