summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/file_system/git_utils.cpp')
-rw-r--r--src/buildtool/file_system/git_utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildtool/file_system/git_utils.cpp b/src/buildtool/file_system/git_utils.cpp
index 8fed7d7b..d9833521 100644
--- a/src/buildtool/file_system/git_utils.cpp
+++ b/src/buildtool/file_system/git_utils.cpp
@@ -32,8 +32,8 @@ constexpr std::size_t kOIDHexSize{GIT_OID_HEXSZ};
auto GitLastError() noexcept -> std::string {
#ifndef BOOTSTRAP_BUILD_TOOL
- git_error const* err{nullptr};
- if ((err = git_error_last()) != nullptr and err->message != nullptr) {
+ git_error const* const err = git_error_last();
+ if (err != nullptr and err->message != nullptr) {
return fmt::format("error code {}: {}", err->klass, err->message);
}
#endif // BOOTSTRAP_BUILD_TOOL