From 559a2d1bc7ca32a4cc73fbfa207c456769c3d8ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 11 Feb 2025 12:21:25 +0700 Subject: [PATCH 1/3] libfetchers/git: fix double quoting in error message --- src/libfetchers/git.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libfetchers/git.cc b/src/libfetchers/git.cc index f46334d30..e25669579 100644 --- a/src/libfetchers/git.cc +++ b/src/libfetchers/git.cc @@ -637,7 +637,7 @@ struct GitInputScheme : InputScheme if (!input.getRev()) setWriteTime(localRefFile, now, now); } catch (Error & e) { - warn("could not update mtime for file '%s': %s", localRefFile, e.info().msg); + warn("could not update mtime for file %s: %s", localRefFile, e.info().msg); } if (!originalRef && !storeCachedHead(repoUrl.to_string(), ref)) warn("could not update cached head '%s' for '%s'", ref, repoInfo.locationToArg()); From 3b0b2fd8d6be6d37f71e6647ee6e7999b1d9ae38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 7 Mar 2025 02:44:35 +0100 Subject: [PATCH 2/3] libflake: fix double quoting when updating flakes --- src/libflake/flake/flake.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libflake/flake/flake.cc b/src/libflake/flake/flake.cc index e573c55c4..475e159cd 100644 --- a/src/libflake/flake/flake.cc +++ b/src/libflake/flake/flake.cc @@ -863,11 +863,11 @@ LockedFlake lockFlake( auto s = chomp(diff); if (lockFileExists) { if (s.empty()) - warn("updating lock file '%s'", outputLockFilePath); + warn("updating lock file %s", outputLockFilePath); else - warn("updating lock file '%s':\n%s", outputLockFilePath, s); + warn("updating lock file %s:\n%s", outputLockFilePath, s); } else - warn("creating lock file '%s': \n%s", outputLockFilePath, s); + warn("creating lock file %s: \n%s", outputLockFilePath, s); std::optional commitMessage = std::nullopt; From 3b1e23af09dd9bbf408f0561fb063b969f4e2cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 7 Mar 2025 03:59:54 +0100 Subject: [PATCH 3/3] libstore/remote-store: avoid old-style casting for maxConnections Type-checking works better this way as (type) style casting is too permissive. --- src/libstore/remote-store.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index 533ea557d..cd807991b 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -28,7 +28,7 @@ RemoteStore::RemoteStore(const Params & params) : RemoteStoreConfig(params) , Store(params) , connections(make_ref>( - std::max(1, (int) maxConnections), + std::max(1, maxConnections.get()), [this]() { auto conn = openConnectionWrapper(); try {