Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/network/fetchlocal.c')
-rw-r--r--tests/network/fetchlocal.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/network/fetchlocal.c b/tests/network/fetchlocal.c
index 73ccec031..06ee3dd36 100644
--- a/tests/network/fetchlocal.c
+++ b/tests/network/fetchlocal.c
@@ -358,16 +358,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;
}