summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-05-17 15:11:45 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-05-28 15:32:20 +0200
commitae5b93629c148dc96de7337095fba4b1e901ee2b (patch)
tree2cc4365b5eac1b400d40ba558521320bade143bc /tests
parent70f7484d2ae7ed4b5c4d074aa5e9f99ebeebdd77 (diff)
downloadlibgit2-ae5b93629c148dc96de7337095fba4b1e901ee2b.tar.gz
remote: remove fetch parameter from create_anonymous
An anonymous remote is not configured and cannot therefore have configured refspecs. Remove the parameter which adds this from the constructor.
Diffstat (limited to 'tests')
-rw-r--r--tests/network/remote/local.c10
-rw-r--r--tests/network/remote/remotes.c12
2 files changed, 6 insertions, 16 deletions
diff --git a/tests/network/remote/local.c b/tests/network/remote/local.c
index 9d96184a2..5d726c958 100644
--- a/tests/network/remote/local.c
+++ b/tests/network/remote/local.c
@@ -39,7 +39,7 @@ static void connect_to_local_repository(const char *local_repository)
{
git_buf_sets(&file_path_buf, cl_git_path_url(local_repository));
- cl_git_pass(git_remote_create_anonymous(&remote, repo, git_buf_cstr(&file_path_buf), NULL));
+ cl_git_pass(git_remote_create_anonymous(&remote, repo, git_buf_cstr(&file_path_buf)));
cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH, NULL));
}
@@ -71,7 +71,7 @@ void test_network_remote_local__retrieve_advertised_before_connect(void)
git_buf_sets(&file_path_buf, cl_git_path_url(cl_fixture("testrepo.git")));
- cl_git_pass(git_remote_create_anonymous(&remote, repo, git_buf_cstr(&file_path_buf), NULL));
+ cl_git_pass(git_remote_create_anonymous(&remote, repo, git_buf_cstr(&file_path_buf)));
cl_git_fail(git_remote_ls(&refs, &refs_len, remote));
}
@@ -213,7 +213,7 @@ void test_network_remote_local__push_to_bare_remote(void)
}
/* Connect to the bare repo */
- cl_git_pass(git_remote_create_anonymous(&localremote, repo, "./localbare.git", NULL));
+ cl_git_pass(git_remote_create_anonymous(&localremote, repo, "./localbare.git"));
cl_git_pass(git_remote_connect(localremote, GIT_DIRECTION_PUSH, NULL));
/* Try to push */
@@ -252,7 +252,7 @@ void test_network_remote_local__push_to_bare_remote_with_file_url(void)
url = cl_git_path_url("./localbare.git");
/* Connect to the bare repo */
- cl_git_pass(git_remote_create_anonymous(&localremote, repo, url, NULL));
+ cl_git_pass(git_remote_create_anonymous(&localremote, repo, url));
cl_git_pass(git_remote_connect(localremote, GIT_DIRECTION_PUSH, NULL));
/* Try to push */
@@ -289,7 +289,7 @@ void test_network_remote_local__push_to_non_bare_remote(void)
}
/* Connect to the bare repo */
- cl_git_pass(git_remote_create_anonymous(&localremote, repo, "./localnonbare", NULL));
+ cl_git_pass(git_remote_create_anonymous(&localremote, repo, "./localnonbare"));
cl_git_pass(git_remote_connect(localremote, GIT_DIRECTION_PUSH, NULL));
/* Try to push */
diff --git a/tests/network/remote/remotes.c b/tests/network/remote/remotes.c
index f81c1ccc0..8619f2e00 100644
--- a/tests/network/remote/remotes.c
+++ b/tests/network/remote/remotes.c
@@ -90,7 +90,7 @@ void test_network_remote_remotes__error_when_no_push_available(void)
};
- cl_git_pass(git_remote_create_anonymous(&r, _repo, cl_fixture("testrepo.git"), NULL));
+ cl_git_pass(git_remote_create_anonymous(&r, _repo, cl_fixture("testrepo.git")));
callbacks.transport = git_transport_local;
cl_git_pass(git_remote_connect(r, GIT_DIRECTION_PUSH, &callbacks));
@@ -465,13 +465,3 @@ void test_network_remote_remotes__query_refspecs(void)
git_remote_free(remote);
git_remote_delete(_repo, "test");
}
-
-void test_network_remote_remotes__fetch_from_anonymous(void)
-{
- git_remote *remote;
-
- cl_git_pass(git_remote_create_anonymous(&remote, _repo, cl_fixture("testrepo.git"),
- "refs/heads/*:refs/other/*"));
- cl_git_pass(git_remote_fetch(remote, NULL, NULL, NULL));
- git_remote_free(remote);
-}