summaryrefslogtreecommitdiff
path: root/src/other_tools/ops_maps
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-08-19 12:50:42 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-08-26 11:36:34 +0200
commit16708110d85714d6ca02623be0cbc99f387e3b77 (patch)
tree3b4de9edc7567a3115d5236649cff4f2b0d22ecf /src/other_tools/ops_maps
parent426f01ee6be96f3ad7298c09adbe5297e3537f1d (diff)
downloadjustbuild-16708110d85714d6ca02623be0cbc99f387e3b77.tar.gz
GitOpParams: Remove unneeded branch field
The 'branch' field is deprecated, not being used by any of the critical Git operations, thus it can be removed.
Diffstat (limited to 'src/other_tools/ops_maps')
-rw-r--r--src/other_tools/ops_maps/content_cas_map.cpp1
-rw-r--r--src/other_tools/ops_maps/critical_git_op_map.hpp3
-rw-r--r--src/other_tools/ops_maps/git_tree_fetch_map.cpp5
-rw-r--r--src/other_tools/ops_maps/import_to_git_map.cpp3
4 files changed, 1 insertions, 11 deletions
diff --git a/src/other_tools/ops_maps/content_cas_map.cpp b/src/other_tools/ops_maps/content_cas_map.cpp
index eac0cf36..0c6ccd25 100644
--- a/src/other_tools/ops_maps/content_cas_map.cpp
+++ b/src/other_tools/ops_maps/content_cas_map.cpp
@@ -137,7 +137,6 @@ auto CreateContentCASMap(
{
storage_config->GitRoot(), // target_path
"", // git_hash
- "", // branch
std::nullopt, // message
true // init_bare
},
diff --git a/src/other_tools/ops_maps/critical_git_op_map.hpp b/src/other_tools/ops_maps/critical_git_op_map.hpp
index fa091655..8c75874c 100644
--- a/src/other_tools/ops_maps/critical_git_op_map.hpp
+++ b/src/other_tools/ops_maps/critical_git_op_map.hpp
@@ -34,7 +34,7 @@ using GitOpKeyMap = std::unordered_map<
AsyncMapConsumerLoggerPtr const&)>>;
struct GitOpKey {
- GitOpParams params{"", "", ""}; /* key (with exceptions) */
+ GitOpParams params{"", ""}; /* key (with exceptions) */
GitOpType op_type{GitOpType::DEFAULT_OP}; /* key */
[[nodiscard]] auto operation(GitOpParams const& params,
@@ -96,7 +96,6 @@ struct hash<GitOpParams> {
size_t seed{};
hash_combine<std::filesystem::path>(&seed, ct.target_path);
hash_combine<std::string>(&seed, ct.git_hash);
- hash_combine<std::string>(&seed, ct.branch);
return seed;
}
};
diff --git a/src/other_tools/ops_maps/git_tree_fetch_map.cpp b/src/other_tools/ops_maps/git_tree_fetch_map.cpp
index 550dab7e..cceda079 100644
--- a/src/other_tools/ops_maps/git_tree_fetch_map.cpp
+++ b/src/other_tools/ops_maps/git_tree_fetch_map.cpp
@@ -133,7 +133,6 @@ void TagAndSetRoot(std::string tree_id,
{
repo, // target_path
tree_id, // git_hash
- "", // branch
"Keep referenced tree alive" // message
},
.op_type = GitOpType::KEEP_TREE};
@@ -180,7 +179,6 @@ void TakeTreeFromOlderGeneration(
{
source, // target_path
tree_id, // git_hash
- "", // branch
"Tag commit for fetching" // message
},
.op_type = GitOpType::KEEP_TREE};
@@ -273,7 +271,6 @@ auto CreateGitTreeFetchMap(
{
storage_config->GitRoot(), // target_path
"", // git_hash
- "", // branch
std::nullopt, // message
true // init_bare
},
@@ -458,7 +455,6 @@ auto CreateGitTreeFetchMap(
{
tmp_dir->GetPath(), // target_path
"", // git_hash
- "", // branch
fmt::format("Content of tree {}",
key.hash), // message
},
@@ -604,7 +600,6 @@ auto CreateGitTreeFetchMap(
{
storage_config->GitRoot(), // target_path
*op_result.result, // git_hash
- "", // branch
"Keep referenced tree alive" // message
},
.op_type = GitOpType::KEEP_TAG};
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 ddbfa115..7e9331b0 100644
--- a/src/other_tools/ops_maps/import_to_git_map.cpp
+++ b/src/other_tools/ops_maps/import_to_git_map.cpp
@@ -36,7 +36,6 @@ void KeepCommitAndSetTree(
{
storage_config.GitRoot(), // target_path
commit, // git_hash
- "", // branch
"Keep referenced tree alive" // message
},
.op_type = GitOpType::KEEP_TAG};
@@ -107,7 +106,6 @@ auto CreateImportToGitMap(
{
key.target_path, // target_path
"", // git_hash
- "", // branch
fmt::format("Content of {} {}",
key.repo_type,
key.content), // message
@@ -138,7 +136,6 @@ auto CreateImportToGitMap(
{
storage_config->GitRoot(), // target_path
"", // git_hash
- "", // branch
std::nullopt, // message
true // init_bare
},