From 91f33def73223721ad91f99040158f3ff54dffab Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 13 Feb 2023 15:31:01 +0100 Subject: GitRepoRemote: Correctly honor SSL certification settings in fetch and commit update Uses the SSL certification utility method to correctly set the certification check options for the remote URL libgit2 calls. Due to the fact that remote operations are done via a temporary repository to allow concurrent work, the correct repository configuration needs to be interrogated. Thankfully, libgit2 provides a thread safe config snapshot object to be used in such scenarios. Also updates the existing GitRepoRemote tests accordingly. --- test/other_tools/git_operations/git_repo_remote.test.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/other_tools/git_operations/git_repo_remote.test.cpp') diff --git a/test/other_tools/git_operations/git_repo_remote.test.cpp b/test/other_tools/git_operations/git_repo_remote.test.cpp index 89f67d41..4b7a2a77 100644 --- a/test/other_tools/git_operations/git_repo_remote.test.cpp +++ b/test/other_tools/git_operations/git_repo_remote.test.cpp @@ -185,7 +185,7 @@ TEST_CASE("Single-threaded real repository remote operations", // remote ls auto remote_commit = repo_remote_ls_bare->GetCommitFromRemote( - *repo_path, "master", logger); + nullptr, *repo_path, "master", logger); REQUIRE(remote_commit); CHECK(*remote_commit == kRootCommit); } @@ -198,7 +198,7 @@ TEST_CASE("Single-threaded real repository remote operations", // fetch CHECK(repo_fetch_all_bare->FetchFromRemote( - *repo_path, std::nullopt, logger)); + nullptr, *repo_path, std::nullopt, logger)); } SECTION("Fetch branch from remote") { @@ -211,7 +211,7 @@ TEST_CASE("Single-threaded real repository remote operations", // fetch CHECK(repo_fetch_branch_bare->FetchFromRemote( - *repo_path, "master", logger)); + nullptr, *repo_path, "master", logger)); } } -- cgit v1.2.3