diff options
| author | Ben Straub <bs@github.com> | 2012-12-20 10:51:09 -0800 |
|---|---|---|
| committer | Ben Straub <bs@github.com> | 2012-12-20 10:52:57 -0800 |
| commit | 29f27599eab750d2b4b8935a14be8b596b7affe2 (patch) | |
| tree | 7ee49c6386cc18d59969ab5d21805ed0624f9df0 /tests-clar/network | |
| parent | 316bca697f16e6fc0c9ecc943e84e9af3b39812b (diff) | |
| download | libgit2-29f27599eab750d2b4b8935a14be8b596b7affe2.tar.gz | |
Rename remote creation APIs
git_remote_add -> git_remote_create
git_remote_new -> git_remote_create_inmemory
Diffstat (limited to 'tests-clar/network')
| -rw-r--r-- | tests-clar/network/fetch.c | 2 | ||||
| -rw-r--r-- | tests-clar/network/fetchlocal.c | 4 | ||||
| -rw-r--r-- | tests-clar/network/push.c | 2 | ||||
| -rw-r--r-- | tests-clar/network/remotelocal.c | 2 | ||||
| -rw-r--r-- | tests-clar/network/remoterename.c | 4 | ||||
| -rw-r--r-- | tests-clar/network/remotes.c | 20 |
6 files changed, 17 insertions, 17 deletions
diff --git a/tests-clar/network/fetch.c b/tests-clar/network/fetch.c index e7247356b..cde4f0365 100644 --- a/tests-clar/network/fetch.c +++ b/tests-clar/network/fetch.c @@ -42,7 +42,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)); diff --git a/tests-clar/network/fetchlocal.c b/tests-clar/network/fetchlocal.c index 018531c5c..24949243e 100644 --- a/tests-clar/network/fetchlocal.c +++ b/tests-clar/network/fetchlocal.c @@ -21,7 +21,7 @@ void test_network_fetchlocal__complete(void) const char *url = cl_git_fixture_url("testrepo.git"); cl_git_pass(git_repository_init(&repo, "foo", true)); - cl_git_pass(git_remote_add(&origin, repo, GIT_REMOTE_ORIGIN, url)); + cl_git_pass(git_remote_create(&origin, repo, GIT_REMOTE_ORIGIN, url)); cl_git_pass(git_remote_connect(origin, GIT_DIRECTION_FETCH)); cl_git_pass(git_remote_download(origin, transfer_cb, &callcount)); cl_git_pass(git_remote_update_tips(origin)); @@ -47,7 +47,7 @@ void test_network_fetchlocal__partial(void) cl_assert_equal_i(1, (int)refnames.count); url = cl_git_fixture_url("testrepo.git"); - cl_git_pass(git_remote_add(&origin, repo, GIT_REMOTE_ORIGIN, url)); + cl_git_pass(git_remote_create(&origin, repo, GIT_REMOTE_ORIGIN, url)); cl_git_pass(git_remote_connect(origin, GIT_DIRECTION_FETCH)); cl_git_pass(git_remote_download(origin, transfer_cb, &callcount)); cl_git_pass(git_remote_update_tips(origin)); diff --git a/tests-clar/network/push.c b/tests-clar/network/push.c index cecb5ba42..5f0a80cc4 100644 --- a/tests-clar/network/push.c +++ b/tests-clar/network/push.c @@ -166,7 +166,7 @@ void test_network_push__initialize(void) _remote = NULL; if (_remote_url) { - cl_git_pass(git_remote_add(&_remote, _repo, "test", _remote_url)); + cl_git_pass(git_remote_create(&_remote, _repo, "test", _remote_url)); git_remote_set_cred_acquire_cb(_remote, cred_acquire_cb, &cred_acquire_called); record_callbacks_data_clear(&_record_cbs_data); diff --git a/tests-clar/network/remotelocal.c b/tests-clar/network/remotelocal.c index 8376b8bf1..1839679de 100644 --- a/tests-clar/network/remotelocal.c +++ b/tests-clar/network/remotelocal.c @@ -50,7 +50,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_new(&remote, repo, NULL, git_buf_cstr(&file_path_buf), NULL)); + cl_git_pass(git_remote_create_inmemory(&remote, repo, NULL, git_buf_cstr(&file_path_buf), NULL)); cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH)); } diff --git a/tests-clar/network/remoterename.c b/tests-clar/network/remoterename.c index bd582314d..35d197e71 100644 --- a/tests-clar/network/remoterename.c +++ b/tests-clar/network/remoterename.c @@ -154,7 +154,7 @@ void test_network_remoterename__renaming_an_inmemory_remote_persists_it(void) assert_config_entry_existence(_repo, "remote.durable.url", false); - cl_git_pass(git_remote_new(&remote, _repo, NULL, "git://github.com/libgit2/durable.git", NULL)); + cl_git_pass(git_remote_create_inmemory(&remote, _repo, NULL, "git://github.com/libgit2/durable.git", NULL)); assert_config_entry_existence(_repo, "remote.durable.url", false); @@ -176,7 +176,7 @@ void test_network_remoterename__renaming_an_inmemory_nameless_remote_notifies_th assert_config_entry_existence(_repo, "remote.volatile.url", false); - cl_git_pass(git_remote_new( + cl_git_pass(git_remote_create_inmemory( &remote, _repo, NULL, diff --git a/tests-clar/network/remotes.c b/tests-clar/network/remotes.c index 651cbefec..15e3b03f4 100644 --- a/tests-clar/network/remotes.c +++ b/tests-clar/network/remotes.c @@ -108,7 +108,7 @@ void test_network_remotes__save(void) _remote = NULL; /* Set up the remote and save it to config */ - cl_git_pass(git_remote_new(&_remote, _repo, "upstream", "git://github.com/libgit2/libgit2", NULL)); + cl_git_pass(git_remote_create_inmemory(&_remote, _repo, "upstream", "git://github.com/libgit2/libgit2", NULL)); cl_git_pass(git_remote_set_fetchspec(_remote, "refs/heads/*:refs/remotes/upstream/*")); cl_git_pass(git_remote_set_pushspec(_remote, "refs/heads/*:refs/heads/*")); cl_git_pass(git_remote_set_pushurl(_remote, "git://github.com/libgit2/libgit2_push")); @@ -229,7 +229,7 @@ void test_network_remotes__add(void) git_remote_free(_remote); _remote = NULL; - cl_git_pass(git_remote_add(&_remote, _repo, "addtest", "http://github.com/libgit2/libgit2")); + cl_git_pass(git_remote_create(&_remote, _repo, "addtest", "http://github.com/libgit2/libgit2")); git_remote_free(_remote); _remote = NULL; @@ -248,14 +248,14 @@ void test_network_remotes__cannot_add_a_nameless_remote(void) cl_assert_equal_i( GIT_EINVALIDSPEC, - git_remote_add(&remote, _repo, NULL, "git://github.com/libgit2/libgit2")); + git_remote_create(&remote, _repo, NULL, "git://github.com/libgit2/libgit2")); } void test_network_remotes__cannot_save_a_nameless_remote(void) { git_remote *remote; - cl_git_pass(git_remote_new(&remote, _repo, NULL, "git://github.com/libgit2/libgit2", NULL)); + cl_git_pass(git_remote_create_inmemory(&remote, _repo, NULL, "git://github.com/libgit2/libgit2", NULL)); cl_assert_equal_i(GIT_EINVALIDSPEC, git_remote_save(remote)); git_remote_free(remote); @@ -267,12 +267,12 @@ void test_network_remotes__cannot_add_a_remote_with_an_invalid_name(void) cl_assert_equal_i( GIT_EINVALIDSPEC, - git_remote_add(&remote, _repo, "Inv@{id", "git://github.com/libgit2/libgit2")); + git_remote_create(&remote, _repo, "Inv@{id", "git://github.com/libgit2/libgit2")); cl_assert_equal_p(remote, NULL); cl_assert_equal_i( GIT_EINVALIDSPEC, - git_remote_add(&remote, _repo, "", "git://github.com/libgit2/libgit2")); + git_remote_create(&remote, _repo, "", "git://github.com/libgit2/libgit2")); cl_assert_equal_p(remote, NULL); } @@ -282,12 +282,12 @@ void test_network_remotes__cannot_initialize_a_remote_with_an_invalid_name(void) cl_assert_equal_i( GIT_EINVALIDSPEC, - git_remote_new(&remote, _repo, "Inv@{id", "git://github.com/libgit2/libgit2", NULL)); + git_remote_create_inmemory(&remote, _repo, "Inv@{id", "git://github.com/libgit2/libgit2", NULL)); cl_assert_equal_p(remote, NULL); cl_assert_equal_i( GIT_EINVALIDSPEC, - git_remote_new(&remote, _repo, "", "git://github.com/libgit2/libgit2", NULL)); + git_remote_create_inmemory(&remote, _repo, "", "git://github.com/libgit2/libgit2", NULL)); cl_assert_equal_p(remote, NULL); } @@ -331,7 +331,7 @@ void test_network_remotes__check_structure_version(void) git_remote_free(_remote); _remote = NULL; - cl_git_pass(git_remote_new(&_remote, _repo, NULL, "test-protocol://localhost", NULL)); + cl_git_pass(git_remote_create_inmemory(&_remote, _repo, NULL, "test-protocol://localhost", NULL)); transport.version = 0; cl_git_fail(git_remote_set_transport(_remote, &transport)); @@ -350,7 +350,7 @@ void test_network_remotes__dangling(void) git_remote_free(_remote); _remote = NULL; - cl_git_pass(git_remote_new(&_remote, NULL, "upstream", "git://github.com/libgit2/libgit2", NULL)); + cl_git_pass(git_remote_create_inmemory(&_remote, NULL, "upstream", "git://github.com/libgit2/libgit2", NULL)); cl_git_pass(git_remote_rename(_remote, "newname", NULL, NULL)); cl_assert_equal_s(git_remote_name(_remote), "newname"); |
