From 18e6fdc293fe416146512c35c4ce6a77cfc2ee39 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sat, 5 Sep 2009 09:27:51 -0400 Subject: Command line option tweaks - Remove the -p shortcut for 'git bz edit --pushed' - I don't find it sufficiently mnemonic to be worth confusion with things like 'git add -p'. - Say -n/--no-add-url instead of just --no-add-url in an error message. - Fix usage messages to consistently use () for grouping and [] for optional parts. --- git-bz | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/git-bz b/git-bz index bdef01b..6a9315d 100755 --- a/git-bz +++ b/git-bz @@ -1292,7 +1292,7 @@ def check_add_url(commits, bug_id=None, is_add_url=False): if is_add_url: print "Aborting." else: - print "Aborting. You can use --no-add-url to turn off adding the URL" + print "Aborting. You can use -n/--no-add-url to turn off adding the URL" sys.exit(0) # Check for merge commits @@ -1990,24 +1990,25 @@ def add_edit_option(): help="allow editing the bugzilla comment") if command == 'add-url': - parser.set_usage("git bz add-url [options] []"); + parser.set_usage("git bz add-url [options] ( | )"); min_args = max_args = 2 elif command == 'apply': parser.set_usage("git bz apply [options] "); add_add_url_options(default=True) min_args = max_args = 1 elif command == 'attach': - parser.set_usage("git bz attach [options] []"); + parser.set_usage("git bz attach [options] [] ( | )"); add_add_url_options(default=True) add_edit_option() - min_args = max_args = 2 + min_args = 1 + max_args = 2 elif command == 'edit': - parser.set_usage("git bz edit [options] [ | | ]"); - parser.add_option("-p", "--pushed", action="store_true", + parser.set_usage("git bz edit [options] ( | | )"); + parser.add_option("", "--pushed", action="store_true", help="pre-fill edit form treating the commits as pushed") min_args = max_args = 1 elif command == 'file': - parser.set_usage("git bz file [options] / [ | ]"); + parser.set_usage("git bz file [options] [[]]/] ( | )"); add_add_url_options(default=True) min_args = 1 max_args = 2 -- cgit v1.2.3