From: Catalin Marinas Date: Fri, 15 Jul 2005 14:31:17 +0000 (+0100) Subject: Add --force option to new X-Git-Tag: v0.14.3~742 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/acf038aef0f011490906473c0d84876fb0f94551 Add --force option to new This option creates a new patch even if there are local changes in the tree. It is useful if one starts modifying the tree but forgot to create a patch for it. Signed-off-by: Catalin Marinas --- diff --git a/stgit/commands/new.py b/stgit/commands/new.py index c018195..c36e109 100644 --- a/stgit/commands/new.py +++ b/stgit/commands/new.py @@ -29,6 +29,9 @@ 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', @@ -49,9 +52,10 @@ 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)