diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-03-26 11:15:57 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-04-01 13:38:04 +0200 |
commit | fd536d29c127648abb2ce5f6f619135ce69b9800 (patch) | |
tree | 8113aac1ee75b94d8637ca8519a456b54c826900 /tests | |
parent | 77b699e0da3d4a4fed742893bd172f3ee7b936d5 (diff) | |
download | libgit2-fd536d29c127648abb2ce5f6f619135ce69b9800.tar.gz |
remote: rename inmemory to anonymous and swap url and fetch order
The order in this function is the opposite to what
create_with_fetchspec() has, so change this one, as url-then-refspec is
what git does.
As we need to break compilation and the swap doesn't do that, let's take
this opportunity to rename in-memory remotes to anonymous as that's
really what sets them apart.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/network/remote/local.c | 8 | ||||
-rw-r--r-- | tests/network/remote/remotes.c | 8 | ||||
-rw-r--r-- | tests/network/remote/rename.c | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/network/remote/local.c b/tests/network/remote/local.c index 589e6ac9b..75f767980 100644 --- a/tests/network/remote/local.c +++ b/tests/network/remote/local.c @@ -30,7 +30,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_inmemory(&remote, repo, NULL, git_buf_cstr(&file_path_buf))); + cl_git_pass(git_remote_create_anonymous(&remote, repo, git_buf_cstr(&file_path_buf), NULL)); cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH)); } @@ -182,7 +182,7 @@ void test_network_remote_local__push_to_bare_remote(void) } /* Connect to the bare repo */ - cl_git_pass(git_remote_create_inmemory(&localremote, repo, NULL, "./localbare.git")); + cl_git_pass(git_remote_create_anonymous(&localremote, repo, "./localbare.git", NULL)); cl_git_pass(git_remote_connect(localremote, GIT_DIRECTION_PUSH)); /* Try to push */ @@ -222,7 +222,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_inmemory(&localremote, repo, NULL, url)); + cl_git_pass(git_remote_create_anonymous(&localremote, repo, url, NULL)); cl_git_pass(git_remote_connect(localremote, GIT_DIRECTION_PUSH)); /* Try to push */ @@ -259,7 +259,7 @@ void test_network_remote_local__push_to_non_bare_remote(void) } /* Connect to the bare repo */ - cl_git_pass(git_remote_create_inmemory(&localremote, repo, NULL, "./localnonbare")); + cl_git_pass(git_remote_create_anonymous(&localremote, repo, "./localnonbare", NULL)); cl_git_pass(git_remote_connect(localremote, GIT_DIRECTION_PUSH)); /* Try to push */ diff --git a/tests/network/remote/remotes.c b/tests/network/remote/remotes.c index fe40d1085..306ccaee5 100644 --- a/tests/network/remote/remotes.c +++ b/tests/network/remote/remotes.c @@ -66,7 +66,7 @@ void test_network_remote_remotes__error_when_no_push_available(void) git_transport *t; git_push *p; - cl_git_pass(git_remote_create_inmemory(&r, _repo, NULL, cl_fixture("testrepo.git"))); + cl_git_pass(git_remote_create_anonymous(&r, _repo, cl_fixture("testrepo.git"), NULL)); cl_git_pass(git_transport_local(&t,r,NULL)); @@ -343,7 +343,7 @@ void test_network_remote_remotes__cannot_save_an_inmemory_remote(void) { git_remote *remote; - cl_git_pass(git_remote_create_inmemory(&remote, _repo, NULL, "git://github.com/libgit2/libgit2")); + cl_git_pass(git_remote_create_anonymous(&remote, _repo, "git://github.com/libgit2/libgit2", NULL)); cl_assert_equal_p(NULL, git_remote_name(remote)); @@ -436,7 +436,7 @@ void test_network_remote_remotes__check_structure_version(void) git_remote_free(_remote); _remote = NULL; - cl_git_pass(git_remote_create_inmemory(&_remote, _repo, NULL, "test-protocol://localhost")); + cl_git_pass(git_remote_create_anonymous(&_remote, _repo, "test-protocol://localhost", NULL)); transport.version = 0; cl_git_fail(git_remote_set_transport(_remote, &transport)); @@ -503,7 +503,7 @@ void test_network_remote_remotes__query_refspecs(void) git_strarray array; int i; - cl_git_pass(git_remote_create_inmemory(&remote, _repo, NULL, "git://github.com/libgit2/libgit2")); + cl_git_pass(git_remote_create_anonymous(&remote, _repo, "git://github.com/libgit2/libgit2", NULL)); for (i = 0; i < 3; i++) { cl_git_pass(git_remote_add_fetch(remote, fetch_refspecs[i])); diff --git a/tests/network/remote/rename.c b/tests/network/remote/rename.c index ed98ee811..4d8628425 100644 --- a/tests/network/remote/rename.c +++ b/tests/network/remote/rename.c @@ -167,7 +167,7 @@ void test_network_remote_rename__cannot_rename_an_inmemory_remote(void) { git_remote *remote; - cl_git_pass(git_remote_create_inmemory(&remote, _repo, NULL, "file:///blah")); + cl_git_pass(git_remote_create_anonymous(&remote, _repo, "file:///blah", NULL)); cl_git_fail(git_remote_rename(remote, "newname", NULL, NULL)); git_remote_free(remote); |