From 07864376504efde66c1e7b1b5185f84a531fe64c Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 20 Feb 2023 09:52:35 +0100 Subject: GitRepoRemote: Add getter for config snapshot --- src/other_tools/git_operations/git_repo_remote.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/other_tools/git_operations/git_repo_remote.hpp') diff --git a/src/other_tools/git_operations/git_repo_remote.hpp b/src/other_tools/git_operations/git_repo_remote.hpp index 83099994..334f7fca 100644 --- a/src/other_tools/git_operations/git_repo_remote.hpp +++ b/src/other_tools/git_operations/git_repo_remote.hpp @@ -17,6 +17,10 @@ #include "src/buildtool/file_system/git_repo.hpp" +extern "C" { +struct git_config; +} + /// \brief Extension to a Git repository, allowing remote Git operations. class GitRepoRemote : public GitRepo { public: @@ -93,6 +97,10 @@ class GitRepoRemote : public GitRepo { std::optional const& branch, 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