~mdw
/
stgit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
e46f135
)
Fix config caching so that get, set, get works
author
Karl Hasselström
<kha@treskal.com>
Mon, 21 May 2007 20:58:38 +0000
(21:58 +0100)
committer
Catalin Marinas
<catalin.marinas@gmail.com>
Mon, 21 May 2007 20:59:28 +0000
(21:59 +0100)
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 <kha@treskal.com>
stgit/config.py
patch
|
blob
|
blame
|
history
diff --git
a/stgit/config.py
b/stgit/config.py
index
79cd12f
..
2fd1273
100644
(file)
--- 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