diff options
Diffstat (limited to 'tests/network/remote/local.c')
-rw-r--r-- | tests/network/remote/local.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/network/remote/local.c b/tests/network/remote/local.c index 16cce6777..f174044d7 100644 --- a/tests/network/remote/local.c +++ b/tests/network/remote/local.c @@ -1,11 +1,10 @@ #include "clar_libgit2.h" -#include "buffer.h" #include "path.h" #include "posix.h" #include "git2/sys/repository.h" static git_repository *repo; -static git_buf file_path_buf = GIT_BUF_INIT; +static git_str file_path_buf = GIT_STR_INIT; static git_remote *remote; static char *push_refspec_strings[] = { @@ -25,7 +24,7 @@ void test_network_remote_local__initialize(void) void test_network_remote_local__cleanup(void) { - git_buf_dispose(&file_path_buf); + git_str_dispose(&file_path_buf); git_remote_free(remote); remote = NULL; @@ -38,9 +37,9 @@ void test_network_remote_local__cleanup(void) static void connect_to_local_repository(const char *local_repository) { - git_buf_sets(&file_path_buf, cl_git_path_url(local_repository)); + git_str_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))); + cl_git_pass(git_remote_create_anonymous(&remote, repo, git_str_cstr(&file_path_buf))); cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH, NULL, NULL, NULL)); } @@ -70,9 +69,9 @@ void test_network_remote_local__retrieve_advertised_before_connect(void) const git_remote_head **refs; size_t refs_len = 0; - git_buf_sets(&file_path_buf, cl_git_path_url(cl_fixture("testrepo.git"))); + git_str_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))); + cl_git_pass(git_remote_create_anonymous(&remote, repo, git_str_cstr(&file_path_buf))); cl_git_fail(git_remote_ls(&refs, &refs_len, remote)); } @@ -472,10 +471,10 @@ void test_network_remote_local__anonymous_remote_inmemory_repo(void) git_repository *inmemory; git_remote *remote; - git_buf_sets(&file_path_buf, cl_git_path_url(cl_fixture("testrepo.git"))); + git_str_sets(&file_path_buf, cl_git_path_url(cl_fixture("testrepo.git"))); cl_git_pass(git_repository_new(&inmemory)); - cl_git_pass(git_remote_create_anonymous(&remote, inmemory, git_buf_cstr(&file_path_buf))); + cl_git_pass(git_remote_create_anonymous(&remote, inmemory, git_str_cstr(&file_path_buf))); cl_git_pass(git_remote_connect(remote, GIT_DIRECTION_FETCH, NULL, NULL, NULL)); cl_assert(git_remote_connected(remote)); git_remote_disconnect(remote); |