summaryrefslogtreecommitdiff
path: root/src/other_tools/root_maps/commit_git_map.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-01-22 12:18:47 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-01-26 14:51:43 +0100
commit6687126208fc225ea18018244ff79d1fb6911a5e (patch)
tree341bb645dc638c7a052cff920ad3a793a687a456 /src/other_tools/root_maps/commit_git_map.hpp
parentd59d5b8fc36b79c973bd525c182dbf0ba8b99251 (diff)
downloadjustbuild-6687126208fc225ea18018244ff79d1fb6911a5e.tar.gz
just-mr 'git' repository: Absent roots sync with serve endpoint
To take advantage of absent roots, we need to ensure that a given serve endpoint can build against the tree of this generated root. To this end, for a 'git' repository we only set the root as absent if the serve endpoint knows already the root, it can set it up itself, or we can create the root locally without a network fetch and then upload it to the serve endpoint via the remote CAS. A network fetch never gets performed for an absent root. If a serve endpoint is not provided, an absent root can still be generated, but only if no network fetches are required. In this case a warning is emitted.
Diffstat (limited to 'src/other_tools/root_maps/commit_git_map.hpp')
-rw-r--r--src/other_tools/root_maps/commit_git_map.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/other_tools/root_maps/commit_git_map.hpp b/src/other_tools/root_maps/commit_git_map.hpp
index 949b0dd1..fd1530af 100644
--- a/src/other_tools/root_maps/commit_git_map.hpp
+++ b/src/other_tools/root_maps/commit_git_map.hpp
@@ -68,7 +68,8 @@ struct hash<GitRepoInfo> {
/// \brief Maps a Git repository commit hash to its tree workspace root,
/// together with the information whether it was a cache hit.
using CommitGitMap =
- AsyncMapConsumer<GitRepoInfo, std::pair<nlohmann::json, bool>>;
+ AsyncMapConsumer<GitRepoInfo,
+ std::pair<nlohmann::json /*root*/, bool /*is_cache_hit*/>>;
[[nodiscard]] auto CreateCommitGitMap(
gsl::not_null<CriticalGitOpMap*> const& critical_git_op_map,