diff options
Diffstat (limited to 'src/buildtool/file_system/git_repo.hpp')
-rw-r--r-- | src/buildtool/file_system/git_repo.hpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/buildtool/file_system/git_repo.hpp b/src/buildtool/file_system/git_repo.hpp index fbb07aec..3fda0516 100644 --- a/src/buildtool/file_system/git_repo.hpp +++ b/src/buildtool/file_system/git_repo.hpp @@ -155,14 +155,13 @@ class GitRepo { std::string const& branch_refname_local, anon_logger_ptr const& logger) noexcept -> std::optional<std::string>; - /// \brief Fetch from given remote using refspec (usually for a branch). + /// \brief Fetch from given remote. It can either fetch a given named + /// branch, or it can fetch with base refspecs. /// Only possible with real repository and thus non-thread-safe. - /// If the refspec string in empty, performs a fetch of all branches with - /// default refspecs. /// Returns a success flag. /// It guarantees the logger is called exactly once with fatal if failure. [[nodiscard]] auto FetchFromRemote(std::string const& repo_url, - std::string const& refspec, + std::optional<std::string> const& branch, anon_logger_ptr const& logger) noexcept -> bool; @@ -225,13 +224,13 @@ class GitRepo { /// custom backend to redirect the fetched objects into the desired odb. /// Caller needs to make sure the temporary directory exists and that the /// given path is thread- and process-safe! - /// Uses either a given branch refspec, or fetches all (if refspec empty). + /// Uses either a given branch, or fetches using base refspecs. /// Returns a success flag. /// It guarantees the logger is called exactly once with fatal if failure. [[nodiscard]] auto FetchViaTmpRepo( std::filesystem::path const& tmp_repo_path, std::string const& repo_url, - std::string const& refspec, + std::optional<std::string> const& branch, anon_logger_ptr const& logger) noexcept -> bool; /// \brief Try to retrieve the root of the repository containing the |