From 1019b431ef6fabfac3aeeb7ba317d7e3a562441f Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Mon, 27 Feb 2012 20:05:20 +0530 Subject: [PATCH] gl-mirror-shell learns '-h' --- src/gl-mirror-shell | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gl-mirror-shell b/src/gl-mirror-shell index d2b6489..e6b25c6 100755 --- a/src/gl-mirror-shell +++ b/src/gl-mirror-shell @@ -39,6 +39,11 @@ die "fatal: GL_HOSTNAME not set in rc; mirroring disabled\n" unless $GL_HOSTNAME # ---------------------------------------------------------------------------- +die "please read the gitolite mirroring documentation; this program is too +critical for you to just run it based on a 'usage' message.\n" if not @ARGV or $ARGV[0] eq '-h'; + +# ---------------------------------------------------------------------------- + # deal with local invocations first # on the "master", run from a shell, for one specific repo, with an optional @@ -77,8 +82,6 @@ if ( ($ARGV[0] || '') eq 'request-push' and not $ENV{SSH_ORIGINAL_COMMAND} ) { exit 0; } -unless (@ARGV) { print STDERR "fatal: missing command\n"; exit 1; } - # ---------- # now the remote invocations; log it, then get the sender name