diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-02-20 09:52:35 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-03-03 16:20:52 +0100 |
commit | 07864376504efde66c1e7b1b5185f84a531fe64c (patch) | |
tree | 62afac72f8f5828e7e2a41c838df9bdd221225e3 /src/other_tools/git_operations/git_repo_remote.hpp | |
parent | 6dcc58ed7745f2446107dce8c1cf69530c866dc1 (diff) | |
download | justbuild-07864376504efde66c1e7b1b5185f84a531fe64c.tar.gz |
GitRepoRemote: Add getter for config snapshot
Diffstat (limited to 'src/other_tools/git_operations/git_repo_remote.hpp')
-rw-r--r-- | src/other_tools/git_operations/git_repo_remote.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<std::string> 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<git_config>; + private: /// \brief Open "fake" repository wrapper for existing CAS. explicit GitRepoRemote(GitCASPtr git_cas) noexcept; |