Remove the resolved command
[stgit] / stgit / config.py
index c40756c..f205e5b 100644 (file)
@@ -28,7 +28,6 @@ class GitConfigException(StgException):
 
 class GitConfig:
     __defaults={
-        'stgit.autoresolved':  'no',
         'stgit.smtpserver':    'localhost:25',
         'stgit.smtpdelay':     '5',
         'stgit.pullcmd':       'git pull',
@@ -37,7 +36,8 @@ class GitConfig:
         'stgit.autoimerge':    'no',
         'stgit.keepoptimized': 'no',
         'stgit.extensions':    '.ancestor .current .patched',
-        'stgit.shortnr':        '5'
+        'stgit.shortnr': '5',
+        'stgit.pager':  'less -FRSX'
         }
 
     __cache = None
@@ -48,7 +48,7 @@ class GitConfig:
         if self.__cache is not None:
             return
         self.__cache = {}
-        lines = Run('git', 'config', '--list', '--null').raw_output()
+        lines = Run('git', 'config', '--null', '--list').raw_output()
         for line in filter(None, lines.split('\0')):
             key, value = line.split('\n', 1)
             self.__cache.setdefault(key, []).append(value)
@@ -109,16 +109,18 @@ class GitConfig:
             if m:
                 result.append(m.group(1))
         return result
+
+    def get_colorbool(self, name, stdout_is_tty):
+        """Invoke 'git config --get-colorbool' and return the result."""
+        return Run('git', 'config', '--get-colorbool', name,
+                   stdout_is_tty).output_one_line()
         
 config=GitConfig()
 
 def config_setup():
     global config
 
-    # Set the PAGER environment to the config value (if any)
-    pager = config.get('stgit.pager')
-    if pager:
-        os.environ['PAGER'] = pager
+    os.environ.setdefault('PAGER', config.get('stgit.pager'))
     # FIXME: handle EDITOR the same way ?
 
 class ConfigOption: