summaryrefslogtreecommitdiff
path: root/tests-clar/online/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests-clar/online/fetch.c')
-rw-r--r--tests-clar/online/fetch.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests-clar/online/fetch.c b/tests-clar/online/fetch.c
index 6fcea2512..41cdb30e1 100644
--- a/tests-clar/online/fetch.c
+++ b/tests-clar/online/fetch.c
@@ -40,7 +40,7 @@ static void do_fetch(const char *url, git_remote_autotag_option_t flag, int n)
callbacks.update_tips = update_tips;
counter = 0;
- cl_git_pass(git_remote_add(&remote, _repo, "test", url));
+ cl_git_pass(git_remote_create(&remote, _repo, "test", url));
git_remote_set_callbacks(remote, &callbacks);
git_remote_set_autotag(remote, flag);
cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH));
@@ -85,13 +85,12 @@ void test_online_fetch__doesnt_retrieve_a_pack_when_the_repository_is_up_to_date
{
git_repository *_repository;
bool invoked = false;
- git_remote *remote, *origin;
+ git_remote *remote;
git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
-
opts.bare = true;
- cl_git_pass(git_remote_new(&origin, NULL, "origin", "https://github.com/libgit2/TestGitRepository.git", GIT_REMOTE_DEFAULT_FETCH));
- cl_git_pass(git_clone(&_repository, origin, "./fetch/lg2", &opts));
+ cl_git_pass(git_clone(&_repository, "https://github.com/libgit2/TestGitRepository.git",
+ "./fetch/lg2", &opts));
git_repository_free(_repository);
cl_git_pass(git_repository_open(&_repository, "./fetch/lg2"));
@@ -109,6 +108,5 @@ void test_online_fetch__doesnt_retrieve_a_pack_when_the_repository_is_up_to_date
git_remote_disconnect(remote);
git_remote_free(remote);
- git_remote_free(origin);
git_repository_free(_repository);
}