summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_utils.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-03-27 18:15:08 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-03-30 13:45:00 +0200
commited9bfe29a1d54a6dca1fa85853457c56108a6183 (patch)
treedcfa02e41e34cb727855e2d8cdbf0bcb9bbb2fba /src/buildtool/file_system/git_utils.hpp
parent0c90ad4bf580a385aa7056298452980b5f8ceb83 (diff)
downloadjustbuild-ed9bfe29a1d54a6dca1fa85853457c56108a6183.tar.gz
GitRepo: Guard fake repository odb wrapping
In the current libgit2 implementation, a fake repository wrapped around an existing odb is being registered as owner the same way as a normal repository object. Therefore, one has to guard both the creation and destruction of the fake repository against all other git operations that might access the internal cache during this transfer of ownership.
Diffstat (limited to 'src/buildtool/file_system/git_utils.hpp')
-rw-r--r--src/buildtool/file_system/git_utils.hpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/buildtool/file_system/git_utils.hpp b/src/buildtool/file_system/git_utils.hpp
index 5749c8b5..fc43e542 100644
--- a/src/buildtool/file_system/git_utils.hpp
+++ b/src/buildtool/file_system/git_utils.hpp
@@ -23,7 +23,6 @@
extern "C" {
struct git_oid;
struct git_odb;
-struct git_repository;
struct git_tree;
struct git_treebuilder;
struct git_index;
@@ -48,8 +47,6 @@ constexpr std::size_t kGitLockNumTries{10};
/// \brief Retrieve error message of last libgit2 call.
[[nodiscard]] auto GitLastError() noexcept -> std::string;
-void repo_closer(gsl::owner<git_repository*> repo);
-
void odb_closer(gsl::owner<git_odb*> odb);
void tree_closer(gsl::owner<git_tree*> tree);