summaryrefslogtreecommitdiff
path: root/src/other_tools/git_operations/git_config_settings.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-10-08 12:56:16 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-10-08 15:41:50 +0200
commit13e86fbbd0986a5f231f4f6bd5fd2423ba75f170 (patch)
treec5aa38fa2c87b0fcfda3a6fd3cc10fc98d1d1ac9 /src/other_tools/git_operations/git_config_settings.cpp
parentab9ff1405f9dd27addb6106e6d6e3ea45c730cc4 (diff)
downloadjustbuild-13e86fbbd0986a5f231f4f6bd5fd2423ba75f170.tar.gz
Name global constants using kCamelCase.
Diffstat (limited to 'src/other_tools/git_operations/git_config_settings.cpp')
-rw-r--r--src/other_tools/git_operations/git_config_settings.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/other_tools/git_operations/git_config_settings.cpp b/src/other_tools/git_operations/git_config_settings.cpp
index b0fe27bc..816e51a7 100644
--- a/src/other_tools/git_operations/git_config_settings.cpp
+++ b/src/other_tools/git_operations/git_config_settings.cpp
@@ -30,18 +30,16 @@ void config_iter_closer(gsl::owner<git_config_iterator*> iter) {
}
// callback to enable SSL certificate check for remote fetch
-const auto certificate_check_cb = [](git_cert* /*cert*/,
- int /*valid*/,
- const char* /*host*/,
- void* /*payload*/) -> int { return 1; };
+const auto kCertificateCheck = [](git_cert* /*cert*/,
+ int /*valid*/,
+ const char* /*host*/,
+ void* /*payload*/) -> int { return 1; };
// callback to remote fetch without an SSL certificate check
-const auto certificate_passthrough_cb = [](git_cert* /*cert*/,
- int /*valid*/,
- const char* /*host*/,
- void* /*payload*/) -> int {
- return 0;
-};
+const auto kCertificatePassthrough = [](git_cert* /*cert*/,
+ int /*valid*/,
+ const char* /*host*/,
+ void* /*payload*/) -> int { return 0; };
/// \brief Custom comparison of matching degrees. Return true if left argument's
/// degree of matching is better that the right argument's. When both are
@@ -187,8 +185,8 @@ auto GitConfigSettings::GetSSLCallback(std::shared_ptr<git_config> const& cfg,
}
}
// set callback: passthrough only if check_cert is false
- return (check_cert and not *check_cert) ? certificate_passthrough_cb
- : certificate_check_cb;
+ return (check_cert and not *check_cert) ? kCertificatePassthrough
+ : kCertificateCheck;
} catch (std::exception const& ex) {
(*logger)(
fmt::format("Getting SSL callback failed with:\n{}", ex.what()),