summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 703f05a)
raw | patch | inline | side by side (parent: 703f05a)
author | Clemens Buchacher <drizzd@aon.at> | |
Mon, 3 Oct 2011 18:21:36 +0000 (20:21 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 5 Oct 2011 17:47:10 +0000 (10:47 -0700) |
A few scripted Porcelain implementations pretend as if the routine to show
their own help messages are triggered upon "git cmd --help", but a command
line parser of "git" will hijack such a request and shows the manpage for
the cmd subcommand.
Leaving the code to handle such input is simply misleading.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
their own help messages are triggered upon "git cmd --help", but a command
line parser of "git" will hijack such a request and shows the manpage for
the cmd subcommand.
Leaving the code to handle such input is simply misleading.
Signed-off-by: Clemens Buchacher <drizzd@aon.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
index e76195ac9721277e9ef270be8eb97dba2462bc37..d4a51da464f5cefea9a5feb4c048b0b0f970b169 100644 (file)
take effect.
-h::
---help::
Show help message.
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 1b8bff2cac163a6588df397168f57214c30b4784..b8eddabc9477ea3ecc6311d88443109041a55c3c 100755 (executable)
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
" --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;
diff --git a/git-difftool.perl b/git-difftool.perl
index ced1615e216018bc20303cd91eaea05c69cb6b11..09b65f1770c09824df5543d208d1df0e9a60d831 100755 (executable)
--- a/git-difftool.perl
+++ b/git-difftool.perl
$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 63da37bcc2730358140ae4b862040ed8fb0ed77e..8c1370f81bfa95832de99d78aa3bee4f763b821a 100755 (executable)
--- a/git-pull.sh
+++ b/git-pull.sh
--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 8e427dab31c27bd78d9eac1ad15bc1f5dcc044c4..1fba6c2de0b78ddb5aa1495c9c519c26b48eebc2 100644 (file)
--- a/git-sh-setup.sh
+++ b/git-sh-setup.sh
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 351e743a902568c8b6f68ffaf4030f087ba8568d..a0410f055406eaaf54ddb056d4b501b3cd250d72 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
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 {