Add the --unrelated option to mail
[stgit] / stgit / config.py
index 48b4e2d..2fd1273 100644 (file)
@@ -29,8 +29,9 @@ class GitConfig:
         'stgit.autoresolved':  'no',
         'stgit.smtpserver':    'localhost:25',
         'stgit.smtpdelay':     '5',
-        'stgit.pullcmd':       'git-fetch',
-        'stgit.pull-does-rebase': 'yes',
+        'stgit.pullcmd':       'git-pull',
+        'stgit.fetchcmd':      'git-fetch',
+        'stgit.pull-policy':   'pull',
         'stgit.merger':                'diff3 -L current -L ancestor -L patched -m -E ' \
                                '"%(branch1)s" "%(ancestor)s" "%(branch2)s" > "%(output)s"',
         'stgit.autoimerge':    'no',
@@ -96,8 +97,17 @@ class GitConfig:
         else:
             raise GitConfigException, 'Value for "%s" is not an integer: "%s"' % (name, value)
 
+    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