diff options
Diffstat (limited to 'src/other_tools/git_operations')
-rw-r--r-- | src/other_tools/git_operations/git_config_settings.cpp | 14 | ||||
-rw-r--r-- | src/other_tools/git_operations/git_operations.cpp | 8 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/other_tools/git_operations/git_config_settings.cpp b/src/other_tools/git_operations/git_config_settings.cpp index c820aa32..b0fe27bc 100644 --- a/src/other_tools/git_operations/git_config_settings.cpp +++ b/src/other_tools/git_operations/git_config_settings.cpp @@ -327,7 +327,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg, true /*fatal*/); return std::nullopt; } - return proxy_info.value(); + return proxy_info; } } // check the generic "http.proxy" gitconfig entry; @@ -348,7 +348,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg, true /*fatal*/); return std::nullopt; } - return proxy_info.value(); + return proxy_info; } // cleanup memory git_buf_dispose(&tmp_buf); @@ -376,7 +376,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg, true /*fatal*/); return std::nullopt; } - return proxy_info.value(); + return proxy_info; } // check HTTPS_PROXY envariable if (const char* envar = std::getenv("HTTPS_PROXY")) { @@ -390,7 +390,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg, true /*fatal*/); return std::nullopt; } - return proxy_info.value(); + return proxy_info; } } else if (url_scheme.value() == "http") { @@ -406,7 +406,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg, true /*fatal*/); return std::nullopt; } - return proxy_info.value(); + return proxy_info; } } // check all_proxy envariable @@ -421,7 +421,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg, true /*fatal*/); return std::nullopt; } - return proxy_info.value(); + return proxy_info; } // check ALL_PROXY envariable if (const char* envar = std::getenv("ALL_PROXY")) { @@ -435,7 +435,7 @@ auto GitConfigSettings::GetProxySettings(std::shared_ptr<git_config> const& cfg, true /*fatal*/); return std::nullopt; } - return proxy_info.value(); + return proxy_info; } } } diff --git a/src/other_tools/git_operations/git_operations.cpp b/src/other_tools/git_operations/git_operations.cpp index 5135743f..be6d9ce1 100644 --- a/src/other_tools/git_operations/git_operations.cpp +++ b/src/other_tools/git_operations/git_operations.cpp @@ -63,7 +63,7 @@ auto CriticalGitOps::GitInitialCommit(GitOpParams const& crit_op_params, return {.git_cas = nullptr, .result = std::nullopt}; } // success - return {.git_cas = git_repo->GetGitCAS(), .result = commit_hash.value()}; + return {.git_cas = git_repo->GetGitCAS(), .result = std::move(commit_hash)}; } auto CriticalGitOps::GitEnsureInit(GitOpParams const& crit_op_params, @@ -132,7 +132,7 @@ auto CriticalGitOps::GitKeepTag(GitOpParams const& crit_op_params, return {.git_cas = nullptr, .result = std::nullopt}; } // success - return {.git_cas = git_repo->GetGitCAS(), .result = *tag_result}; + return {.git_cas = git_repo->GetGitCAS(), .result = std::move(tag_result)}; } auto CriticalGitOps::GitGetHeadId(GitOpParams const& crit_op_params, @@ -165,7 +165,7 @@ auto CriticalGitOps::GitGetHeadId(GitOpParams const& crit_op_params, return {.git_cas = nullptr, .result = std::nullopt}; } // success - return {.git_cas = git_repo->GetGitCAS(), .result = *head_commit}; + return {.git_cas = git_repo->GetGitCAS(), .result = std::move(head_commit)}; } auto CriticalGitOps::GitKeepTree(GitOpParams const& crit_op_params, @@ -208,5 +208,5 @@ auto CriticalGitOps::GitKeepTree(GitOpParams const& crit_op_params, return {.git_cas = nullptr, .result = std::nullopt}; } // success - return {.git_cas = git_repo->GetGitCAS(), .result = *tag_result}; + return {.git_cas = git_repo->GetGitCAS(), .result = std::move(tag_result)}; } |