diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-11-13 17:21:57 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-11-13 17:24:01 +0100 |
commit | 2bad4b844928986d21a57fdb8b223a5ab0fb90e3 (patch) | |
tree | 60b8ee3997e79abf962946d998aaf8c88a29e2e4 | |
parent | 3583ed73a269d7467f2b485bf345a0b70cc1b279 (diff) | |
download | justbuild-2bad4b844928986d21a57fdb8b223a5ab0fb90e3.tar.gz |
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.
-rw-r--r-- | src/buildtool/common/repository_config.hpp | 1 |
1 files changed, 1 insertions, 0 deletions
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( |