X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/fcee87cf868f18a3d684c3ba71232574f92c7b11..8c15e0e4c96f0ecdb40eaeeb05e9adec8021e973:/stgit/commands/new.py diff --git a/stgit/commands/new.py b/stgit/commands/new.py index 1779d9c..c36e109 100644 --- a/stgit/commands/new.py +++ b/stgit/commands/new.py @@ -29,6 +29,11 @@ usage = '%prog [options] ' options = [make_option('-m', '--message', help = 'use MESSAGE as the patch description'), + make_option('--force', + help = 'proceed even if there are local changes', + action = 'store_true'), + make_option('-a', '--author', metavar = '"NAME "', + help = 'use "NAME " as the author details'), make_option('--authname', help = 'use AUTHNAME as the author name'), make_option('--authemail', @@ -47,9 +52,13 @@ def func(parser, options, args): if len(args) != 1: parser.error('incorrect number of arguments') - check_local_changes() - check_conflicts() - check_head_top_equal() + if not options.force: + check_local_changes() + check_conflicts() + check_head_top_equal() + + if options.author: + options.authname, options.authemail = name_email(options.author) crt_series.new_patch(args[0], message = options.message, author_name = options.authname,