From 2ebf355989eb92ac9967eceee0af14d39477afe0 Mon Sep 17 00:00:00 2001 From: Oliver Reiche Date: Fri, 23 Feb 2024 18:51:51 +0100 Subject: just-mr: Fix shell out execution ... by avoiding reusing temp dirs for execute. While we are at it, also refactor LocalFetchViaTmpRepo() to create its own empty temp dirs, that cannot be reused by the caller. --- src/buildtool/file_system/git_repo.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/buildtool/file_system/git_repo.hpp') diff --git a/src/buildtool/file_system/git_repo.hpp b/src/buildtool/file_system/git_repo.hpp index 09e65402..7d0428d0 100644 --- a/src/buildtool/file_system/git_repo.hpp +++ b/src/buildtool/file_system/git_repo.hpp @@ -272,13 +272,10 @@ class GitRepo { /// \brief Fetch from given local repository via a temporary location. Uses /// tmp dir to fetch asynchronously using libgit2. - /// Caller needs to make sure the temporary directory exists and that the - /// given path is thread- and process-safe! /// Uses either a given branch, or fetches all (with base refspecs). /// Returns a success flag. /// It guarantees the logger is called exactly once with fatal if failure. [[nodiscard]] auto LocalFetchViaTmpRepo( - std::filesystem::path const& tmp_dir, std::string const& repo_path, std::optional const& branch, anon_logger_ptr const& logger) noexcept -> bool; @@ -344,4 +341,4 @@ class GitRepo { std::vector const& string_list) noexcept; }; -#endif // INCLUDED_SRC_BUILDTOOL_FILE_SYSTEM_GIT_REPO_HPP \ No newline at end of file +#endif // INCLUDED_SRC_BUILDTOOL_FILE_SYSTEM_GIT_REPO_HPP -- cgit v1.2.3