From 3bd6274e247baa8c9f652fcdfd74180b0933773c Mon Sep 17 00:00:00 2001 Message-Id: <3bd6274e247baa8c9f652fcdfd74180b0933773c.1718889959.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sun, 22 Jan 2006 08:56:24 +0000 Subject: [PATCH] Remove the --force option for new Organization: Straylight/Edgeware From: Catalin Marinas The default behaviour is now the same as the previous 'new --force' since most of the people (and myself) first change the tree and run 'new' afterwards to create the patch. Note that the newly created patch is empty even if there are local changes. A 'refresh' command is needed to add the local changes to the patch. Signed-off-by: Catalin Marinas --- stgit/commands/new.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/stgit/commands/new.py b/stgit/commands/new.py index c968eaf..b8e8446 100644 --- a/stgit/commands/new.py +++ b/stgit/commands/new.py @@ -30,15 +30,11 @@ usage = """%prog [options] Create a new, empty patch and make it the topmost one. If the '--message' option is not passed, an editor is invoked with the .git/patchdescr.tmpl file used a as template, together with generated -lines. By default, if there are local changes in the working tree, the -command fails and a 'refresh' command is needed. This behaviour can be -overridden with the '--force' option.""" +lines. By default, the local changes in the working tree are not included +in the patch. A 'refresh' command is needed for this.""" 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('-s', '--showpatch', help = 'show the patch content in the editor buffer', action = 'store_true'), @@ -62,12 +58,8 @@ def func(parser, options, args): if len(args) != 1: parser.error('incorrect number of arguments') - if not options.force: - check_local_changes() - check_conflicts() - check_head_top_equal() - # No local changes -> no patch to show - options.showpatch = False + check_conflicts() + check_head_top_equal() if options.author: options.authname, options.authemail = name_email(options.author) -- [mdw]