summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/other_tools/root_maps/tree_id_git_map.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/other_tools/root_maps/tree_id_git_map.cpp b/src/other_tools/root_maps/tree_id_git_map.cpp
index ce2fe5e5..752f224d 100644
--- a/src/other_tools/root_maps/tree_id_git_map.cpp
+++ b/src/other_tools/root_maps/tree_id_git_map.cpp
@@ -96,7 +96,16 @@ auto CreateTreeIdGitMap(
auto logger,
auto /*unused*/,
auto const& key) {
- // first, check whether tree exists already in CAS
+ // if root is absent, no work needs to be done
+ if (key.absent) {
+ auto root = nlohmann::json::array(
+ {key.ignore_special ? FileRoot::kGitTreeIgnoreSpecialMarker
+ : FileRoot::kGitTreeMarker,
+ key.hash});
+ (*setter)(std::pair(std::move(root), false));
+ return;
+ }
+ // check whether tree exists already in CAS
// ensure Git cache
// define Git operation to be done
GitOpKey op_key = {.params =