From: Clemens Buchacher <drizzd@aon.at>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [PATCH] use -h for synopsis and --help for manpage consistently
Date: Fri, 23 Sep 2011 13:55:12 +0200 [thread overview]
Message-ID: <20110923115512.GB12122@ecki.lan> (raw)
In-Reply-To: <7vaa9xyxpf.fsf@alter.siamese.dyndns.org>
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
---
On Wed, Sep 21, 2011 at 10:04:28PM -0700, Junio C Hamano wrote:
>
> * cb/send-email-help (2011-09-12) 1 commit
> (merged to 'next' on 2011-09-14 at ae71999)
> + send-email: add option -h
>
> A separate set of patches to remove the hidden fully-spelled "help" from
> other commands would be nice to have as companion patches as well.
This should do it.
Clemens
Documentation/blame-options.txt | 1 -
git-cvsserver.perl | 4 ++--
git-difftool.perl | 2 +-
git-pull.sh | 2 +-
git-sh-setup.sh | 2 +-
git-svn.perl | 2 +-
6 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
index e76195a..d4a51da 100644
--- a/Documentation/blame-options.txt
+++ b/Documentation/blame-options.txt
@@ -117,5 +117,4 @@ commit. And the default value is 40. If there are more than one
take effect.
-h::
---help::
Show help message.
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 1b8bff2..6c5185e 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -109,14 +109,14 @@ my $usage =
" --strict-paths : Don't allow recursing into subdirectories\n".
" --export-all : Don't check for gitcvs.enabled in config\n".
" --version, -V : Print version information and exit\n".
- " --help, -h, -H : Print usage information and exit\n".
+ " -h : Print usage information and exit\n".
"\n".
"<directory> ... is a list of allowed directories. If no directories\n".
"are given, all are allowed. This is an additional restriction, gitcvs\n".
"access still needs to be enabled by the gitcvs.enabled config option.\n".
"Alternately, one directory may be specified in GIT_CVSSERVER_ROOT.\n";
-my @opts = ( 'help|h|H', 'version|V',
+my @opts = ( 'h', 'version|V',
'base-path=s', 'strict-paths', 'export-all' );
GetOptions( $state, @opts )
or die $usage;
diff --git a/git-difftool.perl b/git-difftool.perl
index ced1615..09b65f1 100755
--- a/git-difftool.perl
+++ b/git-difftool.perl
@@ -97,7 +97,7 @@ sub generate_command
$prompt = 'yes';
next;
}
- if ($arg eq '-h' || $arg eq '--help') {
+ if ($arg eq '-h') {
usage();
}
push @command, $arg;
diff --git a/git-pull.sh b/git-pull.sh
index 63da37b..8c1370f 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -120,7 +120,7 @@ do
--d|--dr|--dry|--dry-|--dry-r|--dry-ru|--dry-run)
dry_run=--dry-run
;;
- -h|--h|--he|--hel|--help|--help-|--help-a|--help-al|--help-all)
+ -h|--help-all)
usage
;;
*)
diff --git a/git-sh-setup.sh b/git-sh-setup.sh
index 8e427da..1fba6c2 100644
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
@@ -90,7 +90,7 @@ $LONG_USAGE"
fi
case "$1" in
- -h|--h|--he|--hel|--help)
+ -h)
echo "$LONG_USAGE"
exit
esac
diff --git a/git-svn.perl b/git-svn.perl
index 89f83fd..a019f55 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -294,7 +294,7 @@ read_git_config(\%opts);
if ($cmd && ($cmd eq 'log' || $cmd eq 'blame')) {
Getopt::Long::Configure('pass_through');
}
-my $rv = GetOptions(%opts, 'help|H|h' => \$_help, 'version|V' => \$_version,
+my $rv = GetOptions(%opts, 'h' => \$_help, 'version|V' => \$_version,
'minimize-connections' => \$Git::SVN::Migration::_minimize,
'id|i=s' => \$Git::SVN::default_ref_id,
'svn-remote|remote|R=s' => sub {
--
1.7.6.1
next prev parent reply other threads:[~2011-09-23 12:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-22 5:04 What's cooking in git.git (Sep 2011, #06; Wed, 21) Junio C Hamano
2011-09-22 8:37 ` Carlos Martín Nieto
2011-09-22 9:14 ` Michael Schubert
2011-09-22 16:39 ` Junio C Hamano
2011-09-22 23:01 ` Jakub Narebski
2011-09-22 23:12 ` Junio C Hamano
2011-09-22 23:33 ` Jakub Narebski
2011-09-22 23:45 ` Junio C Hamano
2011-09-23 11:00 ` [PATCH] fix push --quiet: add 'quiet' capability to receive-pack Clemens Buchacher
2011-09-23 11:55 ` Clemens Buchacher [this message]
2011-09-23 14:44 ` What's cooking in git.git (Sep 2011, #06; Wed, 21) Scott Chacon
2011-09-23 18:00 ` Junio C Hamano
2011-09-23 19:29 ` Junio C Hamano
2011-09-26 14:03 ` Scott Chacon
2011-09-26 18:52 ` Junio C Hamano
2011-09-27 2:08 ` Jay Soffian
[not found] ` <20111003182136.GA6136@ecki.lan>
2011-10-03 22:03 ` [PATCH] use -h for synopsis and --help for manpage consistently Junio C Hamano
2011-10-05 6:33 ` Clemens Buchacher
2011-10-05 6:31 ` [PATCH] fix push --quiet: add 'quiet' capability to receive-pack Clemens Buchacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110923115512.GB12122@ecki.lan \
--to=drizzd@aon.at \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).