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
committerMaksim Denisov <denisov.maksim@huawei.com>2024-12-05 11:08:08 +0100
commitca952159e778f0ed927082832a195842f6229a94 (patch)
tree368e62beeb0c1a5085dc07a37087355320e08d52 /src/buildtool/file_system/git_cas.hpp
parent9a164558010af84d834dee86f1929bd6582a1ccb (diff)
downloadjustbuild-ca952159e778f0ed927082832a195842f6229a94.tar.gz
GitCAS: remove friend GitRepo
...and access internal state via getters.
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 37f197f0..0b104f54 100644
--- a/src/buildtool/file_system/git_cas.hpp
+++ b/src/buildtool/file_system/git_cas.hpp
@@ -55,6 +55,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.
@@ -78,8 +83,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