summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-10-01 09:35:04 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-10-25 13:00:43 +0200
commit6b9a7e11563d20aa4e4cb4c62146362f4c90c533 (patch)
treefc01d0379b199df76afc6d1b31c5bec84e95d2cb
parentee30f8a8acf04ce67b84c2250133f69aeb110793 (diff)
downloadjustbuild-6b9a7e11563d20aa4e4cb4c62146362f4c90c533.tar.gz
just-mr: Small fixes
-rw-r--r--src/other_tools/just_mr/launch.cpp4
-rw-r--r--src/other_tools/just_mr/launch.hpp2
-rw-r--r--src/other_tools/just_mr/setup.cpp3
-rw-r--r--src/other_tools/just_mr/setup.hpp3
-rw-r--r--src/other_tools/just_mr/update.cpp2
-rw-r--r--src/other_tools/just_mr/update.hpp3
-rw-r--r--src/other_tools/root_maps/fpath_git_map.cpp4
-rw-r--r--src/other_tools/root_maps/fpath_git_map.hpp4
8 files changed, 14 insertions, 11 deletions
diff --git a/src/other_tools/just_mr/launch.cpp b/src/other_tools/just_mr/launch.cpp
index 16429864..8430713c 100644
--- a/src/other_tools/just_mr/launch.cpp
+++ b/src/other_tools/just_mr/launch.cpp
@@ -44,7 +44,7 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file,
StorageConfig const& storage_config,
Storage const& storage,
bool forward_build_root,
- std::string multi_repo_tool_name) -> int {
+ std::string const& multi_repo_tool_name) -> int {
// check if subcmd_name can be taken from additional args
auto additional_args_offset = 0U;
auto subcommand = just_cmd_args.subcmd_name;
@@ -89,7 +89,7 @@ auto CallJust(std::optional<std::filesystem::path> const& config_file,
storage_config,
storage,
/*interactive=*/false,
- std::move(multi_repo_tool_name));
+ multi_repo_tool_name);
if (not mr_config_path) {
Logger::Log(LogLevel::Error,
"Failed to setup config for calling \"{} {}\"",
diff --git a/src/other_tools/just_mr/launch.hpp b/src/other_tools/just_mr/launch.hpp
index cea43534..69c1603a 100644
--- a/src/other_tools/just_mr/launch.hpp
+++ b/src/other_tools/just_mr/launch.hpp
@@ -36,6 +36,6 @@
StorageConfig const& storage_config,
Storage const& storage,
bool forward_build_root,
- std::string multi_repo_tool_name) -> int;
+ std::string const& multi_repo_tool_name) -> int;
#endif // INCLUDED_SRC_OTHER_TOOLS_JUST_MR_LAUNCH_HPP
diff --git a/src/other_tools/just_mr/setup.cpp b/src/other_tools/just_mr/setup.cpp
index 1629402b..5cb34084 100644
--- a/src/other_tools/just_mr/setup.cpp
+++ b/src/other_tools/just_mr/setup.cpp
@@ -64,7 +64,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config,
StorageConfig const& storage_config,
Storage const& storage,
bool interactive,
- std::string multi_repo_tool_name)
+ std::string const& multi_repo_tool_name)
-> std::optional<std::filesystem::path> {
// provide report
Logger::Log(LogLevel::Info, "Performing repositories setup");
@@ -104,6 +104,7 @@ auto MultiRepoSetup(std::shared_ptr<Configuration> const& config,
LogLevel::Error,
"Unsupported value {} for field \"main\" in configuration.",
main_from_config->ToString());
+ return std::nullopt;
}
}
}
diff --git a/src/other_tools/just_mr/setup.hpp b/src/other_tools/just_mr/setup.hpp
index f9a37c36..953b20eb 100644
--- a/src/other_tools/just_mr/setup.hpp
+++ b/src/other_tools/just_mr/setup.hpp
@@ -37,6 +37,7 @@
StorageConfig const& storage_config,
Storage const& storage,
bool interactive,
- std::string multi_repo_tool_name) -> std::optional<std::filesystem::path>;
+ std::string const& multi_repo_tool_name)
+ -> std::optional<std::filesystem::path>;
#endif // INCLUDED_SRC_OTHER_TOOLS_JUST_MR_SETUP_HPP
diff --git a/src/other_tools/just_mr/update.cpp b/src/other_tools/just_mr/update.cpp
index 587a0f8f..ce804041 100644
--- a/src/other_tools/just_mr/update.cpp
+++ b/src/other_tools/just_mr/update.cpp
@@ -39,7 +39,7 @@ auto MultiRepoUpdate(std::shared_ptr<Configuration> const& config,
MultiRepoCommonArguments const& common_args,
MultiRepoUpdateArguments const& update_args,
StorageConfig const& storage_config,
- std::string multi_repo_tool_name) -> int {
+ std::string const& multi_repo_tool_name) -> int {
// provide report
Logger::Log(LogLevel::Info, "Performing repositories update");
diff --git a/src/other_tools/just_mr/update.hpp b/src/other_tools/just_mr/update.hpp
index 26729935..2836674f 100644
--- a/src/other_tools/just_mr/update.hpp
+++ b/src/other_tools/just_mr/update.hpp
@@ -26,6 +26,7 @@
MultiRepoCommonArguments const& common_args,
MultiRepoUpdateArguments const& update_args,
StorageConfig const& storage_config,
- std::string multi_repo_tool_name) -> int;
+ std::string const& multi_repo_tool_name)
+ -> int;
#endif // INCLUDED_SRC_OTHER_TOOLS_JUST_MR_UPDATE_HPP
diff --git a/src/other_tools/root_maps/fpath_git_map.cpp b/src/other_tools/root_maps/fpath_git_map.cpp
index dbda05ce..023dedf8 100644
--- a/src/other_tools/root_maps/fpath_git_map.cpp
+++ b/src/other_tools/root_maps/fpath_git_map.cpp
@@ -239,8 +239,8 @@ auto CreateFilePathGitMap(
gsl::not_null<StorageConfig const*> const& storage_config,
IExecutionApi const* remote_api,
std::size_t jobs,
- std::string multi_repo_tool_name,
- std::string build_tool_name) -> FilePathGitMap {
+ std::string const& multi_repo_tool_name,
+ std::string const& build_tool_name) -> FilePathGitMap {
auto dir_to_git = [current_subcmd,
critical_git_op_map,
import_to_git_map,
diff --git a/src/other_tools/root_maps/fpath_git_map.hpp b/src/other_tools/root_maps/fpath_git_map.hpp
index bfdfc384..cb13da5c 100644
--- a/src/other_tools/root_maps/fpath_git_map.hpp
+++ b/src/other_tools/root_maps/fpath_git_map.hpp
@@ -59,8 +59,8 @@ using FilePathGitMap = AsyncMapConsumer<FpathInfo, nlohmann::json>;
gsl::not_null<StorageConfig const*> const& storage_config,
IExecutionApi const* remote_api,
std::size_t jobs,
- std::string multi_repo_tool_name,
- std::string build_tool_name) -> FilePathGitMap;
+ std::string const& multi_repo_tool_name,
+ std::string const& build_tool_name) -> FilePathGitMap;
namespace std {
template <>