static void connect_to_local_repository(const char *local_repository) { build_local_file_url(&file_path_buf, local_repository); cl_git_pass(git_remote_new(&remote, repo, NULL, git_buf_cstr(&file_path_buf), NULL)); cl_git_pass(git_remote_connect(remote, GIT_DIR_FETCH)); }
void test_network_remotelocal__initialize(void) { cl_fixture("remotelocal"); cl_git_pass(git_repository_init(&repo, "remotelocal/", 0)); cl_assert(repo != NULL); build_local_file_url(&file_path_buf, "testrepo.git"); cl_git_pass(git_remote_new(&remote, repo, git_buf_cstr(&file_path_buf), NULL)); cl_git_pass(git_remote_connect(remote, GIT_DIR_FETCH)); }
void test_clone_nonetwork__local_bare(void) { git_buf src = GIT_BUF_INIT; build_local_file_url(&src, cl_fixture("testrepo.git")); #if DO_LOCAL_TEST cl_set_cleanup(&cleanup_repository, "./local.git"); cl_git_pass(git_clone_bare(&g_repo, git_buf_cstr(&src), "./local.git", NULL)); #endif git_buf_free(&src); }