From ed9bfe29a1d54a6dca1fa85853457c56108a6183 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 27 Mar 2023 18:15:08 +0200 Subject: 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. --- src/buildtool/file_system/git_utils.hpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/buildtool/file_system/git_utils.hpp') 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 repo); - void odb_closer(gsl::owner odb); void tree_closer(gsl::owner tree); -- cgit v1.2.3