Skip to content

Commit

Permalink
Merge branch 'cb/do-not-pretend-to-hijack-long-help'
Browse files Browse the repository at this point in the history
* cb/do-not-pretend-to-hijack-long-help:
  use -h for synopsis and --help for manpage consistently
  • Loading branch information
Junio C Hamano committed Oct 12, 2011
2 parents 7ed72d1 + 87182b1 commit 5366afa
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion Documentation/blame-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,4 @@ commit. And the default value is 40. If there are more than one
take effect.

-h::
--help::
Show help message.
4 changes: 2 additions & 2 deletions git-cvsserver.perl
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@
" --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, -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|H', 'version|V',
'base-path=s', 'strict-paths', 'export-all' );
GetOptions( $state, @opts )
or die $usage;
Expand Down
2 changes: 1 addition & 1 deletion git-difftool.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion git-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion git-sh-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ $LONG_USAGE"
fi
case "$1" in
-h|--h|--he|--hel|--help)
-h)
echo "$LONG_USAGE"
exit
esac
Expand Down
2 changes: 1 addition & 1 deletion git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ BEGIN
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|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 {
Expand Down

0 comments on commit 5366afa

Please sign in to comment.