From: Karl Hasselström Date: Mon, 21 May 2007 20:58:38 +0000 (+0100) Subject: Fix config caching so that get, set, get works X-Git-Tag: v0.14.3~242 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/8591add961238ffbf0458c66593b642c9764219c?hp=e46f1350a9284095b239ce3568a2fe61149c7391 Fix config caching so that get, set, get works The config caching was never invalidated or updated, which caused the two gets to always return the same value regardless of the value passed to set. Signed-off-by: Karl Hasselström --- diff --git a/stgit/config.py b/stgit/config.py index 79cd12f..2fd1273 100644 --- a/stgit/config.py +++ b/stgit/config.py @@ -99,12 +99,15 @@ class GitConfig: def rename_section(self, from_name, to_name): self.__run('git-repo-config --rename-section', [from_name, to_name]) + self.__cache.clear() def set(self, name, value): self.__run('git-repo-config', [name, value]) + self.__cache[name] = value def unset(self, name): self.__run('git-repo-config --unset', [name]) + self.__cache[name] = None def sections_matching(self, regexp): """Takes a regexp with a single group, matches it against all