From 2bad4b844928986d21a57fdb8b223a5ab0fb90e3 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Wed, 13 Nov 2024 17:21:57 +0100 Subject: RepositoryConfig: get rid of implict usage assumption The class RepositoryConfig is mutable, but has a set-once derived value, the largest bisimulation of the repositories described. This construction is problematic in that it assumes that all modifications be done before the first inspection of a value happens that implicitly triggers the setting of the derived value. Therefore, at the very least reset this derived value if a repository is modified. --- src/buildtool/common/repository_config.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/buildtool/common/repository_config.hpp') diff --git a/src/buildtool/common/repository_config.hpp b/src/buildtool/common/repository_config.hpp index 25d5ce4f..54440187 100644 --- a/src/buildtool/common/repository_config.hpp +++ b/src/buildtool/common/repository_config.hpp @@ -55,6 +55,7 @@ class RepositoryConfig { repos_[repo].base_desc = info.BaseContentDescription(); repos_[repo].info = std::move(info); repos_[repo].key.Reset(); + duplicates_.Reset(); } [[nodiscard]] auto SetGitCAS( -- cgit v1.2.3