From acf038aef0f011490906473c0d84876fb0f94551 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Fri, 15 Jul 2005 15:31:17 +0100 Subject: [PATCH] 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 --- stgit/commands/new.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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) -- 2.11.0