From 59988ee056da790018378199e5f0adc69f01de65 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Fri, 29 Sep 2023 12:16:37 +0200 Subject: GitRepo: Add method for async fetch from local repository This avoids using the more geenric GitRepoRemote method which has libcurl as a dependency, something that is not needed for this Git operation. --- src/other_tools/git_operations/git_repo_remote.cpp | 8 -------- src/other_tools/git_operations/git_repo_remote.hpp | 4 ---- 2 files changed, 12 deletions(-) (limited to 'src/other_tools/git_operations') diff --git a/src/other_tools/git_operations/git_repo_remote.cpp b/src/other_tools/git_operations/git_repo_remote.cpp index 580375ec..9739362a 100644 --- a/src/other_tools/git_operations/git_repo_remote.cpp +++ b/src/other_tools/git_operations/git_repo_remote.cpp @@ -619,11 +619,3 @@ auto GitRepoRemote::FetchViaTmpRepo(std::filesystem::path const& tmp_dir, return false; } } - -auto GitRepoRemote::GetConfigSnapshot() const -> std::shared_ptr { - git_config* cfg_ptr{nullptr}; - if (git_repository_config_snapshot(&cfg_ptr, GetRepoRef()->Ptr()) != 0) { - return nullptr; - } - return std::shared_ptr(cfg_ptr, config_closer); -} diff --git a/src/other_tools/git_operations/git_repo_remote.hpp b/src/other_tools/git_operations/git_repo_remote.hpp index cfe1736d..ac4f59aa 100644 --- a/src/other_tools/git_operations/git_repo_remote.hpp +++ b/src/other_tools/git_operations/git_repo_remote.hpp @@ -110,10 +110,6 @@ class GitRepoRemote : public GitRepo { anon_logger_ptr const& logger) noexcept -> bool; - /// \brief Get a snapshot of the repository configuration. - /// Returns nullptr on errors. - [[nodiscard]] auto GetConfigSnapshot() const -> std::shared_ptr; - private: /// \brief Open "fake" repository wrapper for existing CAS. explicit GitRepoRemote(GitCASPtr git_cas) noexcept; -- cgit v1.2.3