summaryrefslogtreecommitdiff
path: root/src/other_tools/ops_maps
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2024-06-27 17:22:32 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2024-06-28 11:24:09 +0200
commited7e81b9aefaa47e61983d14c2447bbd1f5c95c5 (patch)
tree366dc9ab8809cc05f4354c2007bd47281a7c2974 /src/other_tools/ops_maps
parent956ed669cf71d1ee74dbb573c542a7565c3a90d3 (diff)
downloadjustbuild-ed7e81b9aefaa47e61983d14c2447bbd1f5c95c5.tar.gz
Use (un)expected for Git repo
Diffstat (limited to 'src/other_tools/ops_maps')
-rw-r--r--src/other_tools/ops_maps/import_to_git_map.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/other_tools/ops_maps/import_to_git_map.cpp b/src/other_tools/ops_maps/import_to_git_map.cpp
index 6aacbaf4..5c30f3d5 100644
--- a/src/other_tools/ops_maps/import_to_git_map.cpp
+++ b/src/other_tools/ops_maps/import_to_git_map.cpp
@@ -70,11 +70,11 @@ void KeepCommitAndSetTree(
});
auto res = just_git_repo->GetSubtreeFromCommit(
commit, ".", wrapped_logger);
- if (not std::holds_alternative<std::string>(res)) {
+ if (not res) {
return;
}
- (*setter)(std::pair<std::string, GitCASPtr>(
- std::get<std::string>(res), just_git_cas));
+ (*setter)(std::pair<std::string, GitCASPtr>(*std::move(res),
+ just_git_cas));
},
[logger, commit, target_path](auto const& msg, bool fatal) {
(*logger)(fmt::format("While running critical Git op KEEP_TAG for "