Remove the checking for the default configuration values
[stgit] / stgit / commands / refresh.py
index f5cb2e9..c5f390f 100644 (file)
@@ -26,7 +26,7 @@ from stgit.config import config
 
 
 help = 'generate a new commit for the current patch'
-usage = """%prog [options]
+usage = """%prog [options] [<files...>]
 
 Include the latest tree changes in the current patch. This command
 generates a new GIT commit object with the patch details, the previous
@@ -44,6 +44,9 @@ options = [make_option('-f', '--force',
                        help = 'invoke an editor for the patch '\
                        'description',
                        action = 'store_true'),
+           make_option('-s', '--showpatch',
+                       help = 'show the patch content in the editor buffer',
+                       action = 'store_true'),
            make_option('-m', '--message',
                        help = 'use MESSAGE as the patch ' \
                        'description'),
@@ -63,13 +66,7 @@ options = [make_option('-f', '--force',
 
 
 def func(parser, options, args):
-    if len(args) != 0:
-        parser.error('incorrect number of arguments')
-
-    if config.has_option('stgit', 'autoresolved'):
-        autoresolved = config.get('stgit', 'autoresolved')
-    else:
-        autoresolved = 'no'
+    autoresolved = config.get('stgit', 'autoresolved')
 
     if autoresolved != 'yes':
         check_conflicts()
@@ -94,8 +91,10 @@ def func(parser, options, args):
 
         if autoresolved == 'yes':
             resolved_all()
-        crt_series.refresh_patch(message = options.message,
+        crt_series.refresh_patch(files = args,
+                                 message = options.message,
                                  edit = options.edit,
+                                 show_patch = options.showpatch,
                                  author_name = options.authname,
                                  author_email = options.authemail,
                                  author_date = options.authdate,