diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2024-02-23 18:51:51 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2024-03-08 14:16:45 +0100 |
commit | 2ebf355989eb92ac9967eceee0af14d39477afe0 (patch) | |
tree | db993f8df39eb05b625b2c4590f1e5696b2e7b04 /src/buildtool/file_system/git_repo.hpp | |
parent | c512ae174920ada425e2b33d0fea24891d6305bd (diff) | |
download | justbuild-2ebf355989eb92ac9967eceee0af14d39477afe0.tar.gz |
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.
Diffstat (limited to 'src/buildtool/file_system/git_repo.hpp')
-rw-r--r-- | src/buildtool/file_system/git_repo.hpp | 5 |
1 files changed, 1 insertions, 4 deletions
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<std::string> const& branch, anon_logger_ptr const& logger) noexcept -> bool; @@ -344,4 +341,4 @@ class GitRepo { std::vector<std::string> 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 |