summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_cas.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-12-04 14:59:34 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2025-01-13 16:22:13 +0100
commit0ddce95c7ed1dd3dd0a5df31138b58a87e11821b (patch)
treed2d80d7693f7c7e681de695a8dd854bf8b34ef82 /src/buildtool/file_system/git_cas.hpp
parent150d84062bdfb21c9edd3b93c3595fea7107b15d (diff)
downloadjustbuild-0ddce95c7ed1dd3dd0a5df31138b58a87e11821b.tar.gz
GitCAS: remove friend GitRepo
...and access internal state via getters. (cherry-picked from ca952159e778f0ed927082832a195842f6229a94)
Diffstat (limited to 'src/buildtool/file_system/git_cas.hpp')
-rw-r--r--src/buildtool/file_system/git_cas.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buildtool/file_system/git_cas.hpp b/src/buildtool/file_system/git_cas.hpp
index 8b2cdb1e..525f5c66 100644
--- a/src/buildtool/file_system/git_cas.hpp
+++ b/src/buildtool/file_system/git_cas.hpp
@@ -58,6 +58,11 @@ class GitCAS {
return repo_.get();
}
+ [[nodiscard]] auto GetPath() const noexcept
+ -> std::filesystem::path const& {
+ return git_path_;
+ }
+
/// \brief Read object from CAS.
/// \param id The object id.
/// \param is_hex_id Specify whether `id` is hex string or raw.
@@ -81,8 +86,6 @@ class GitCAS {
repository_closer};
// git folder path of repo
std::filesystem::path git_path_;
-
- friend class GitRepo; // allow access to ODB
};
#endif // INCLUDED_SRC_BUILDTOOL_FILE_SYSTEM_GIT_CAS_HPP