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.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/buildtool/file_system/git_utils.cpp') diff --git a/src/buildtool/file_system/git_utils.cpp b/src/buildtool/file_system/git_utils.cpp index a38fae39..a3b503ab 100644 --- a/src/buildtool/file_system/git_utils.cpp +++ b/src/buildtool/file_system/git_utils.cpp @@ -69,12 +69,6 @@ auto GitObjectID(std::string const& id, bool is_hex_id) noexcept #endif // BOOTSTRAP_BUILD_TOOL } -void repo_closer(gsl::owner repo) { -#ifndef BOOTSTRAP_BUILD_TOOL - git_repository_free(repo); -#endif -} - void odb_closer(gsl::owner odb) { #ifndef BOOTSTRAP_BUILD_TOOL git_odb_free(odb); -- cgit v1.2.3