'export' to use the global template file
[stgit] / stgit / commands / refresh.py
index 81e3066..f5cb2e9 100644 (file)
@@ -26,7 +26,15 @@ from stgit.config import config
 
 
 help = 'generate a new commit for the current patch'
-usage = '%prog [options]'
+usage = """%prog [options]
+
+Include the latest tree changes in the current patch. This command
+generates a new GIT commit object with the patch details, the previous
+one no longer being visible. The patch attributes like author,
+committer and description can be changed with the command line
+options. The '--force' option is useful when a commit object was
+created with a different tool but the changes need to be included in
+the current patch."""
 
 options = [make_option('-f', '--force',
                        help = 'force the refresh even if HEAD and '\
@@ -39,6 +47,8 @@ options = [make_option('-f', '--force',
            make_option('-m', '--message',
                        help = 'use MESSAGE as the patch ' \
                        'description'),
+           make_option('-a', '--author', metavar = '"NAME <EMAIL>"',
+                       help = 'use "NAME <EMAIL>" as the author details'),
            make_option('--authname',
                        help = 'use AUTHNAME as the author name'),
            make_option('--authemail',
@@ -71,6 +81,9 @@ def func(parser, options, args):
     if not options.force:
         check_head_top_equal()
 
+    if options.author:
+        options.authname, options.authemail = name_email(options.author)
+
     if git.local_changes() \
            or not crt_series.head_top_equal() \
            or options.edit or options.message \