From: Frank Lichtenheld Date: Fri, 06 Apr 2007 21:52:41 GMT Subject: [PATCH 3/5] cvsimport: Improve usage error reporting Message-ID: <11758963642149-git-send-email-frank@lichtenheld.de> In-Reply-To: <11758963643049-git-send-email-frank@lichtenheld.de> Actually tell the user what he did wrong in case of usage errors instead of only printing the general usage information. Signed-off-by: Frank Lichtenheld --- git-cvsimport.perl | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/git-cvsimport.perl b/git-cvsimport.perl index d3fbcbc..ac74bc5 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -32,7 +32,9 @@ $ENV{'TZ'}="UTC"; our ($opt_h,$opt_o,$opt_v,$opt_k,$opt_u,$opt_d,$opt_p,$opt_C,$opt_z,$opt_i,$opt_P, $opt_s,$opt_m,$opt_M,$opt_A,$opt_S,$opt_L, $opt_a); my (%conv_author_name, %conv_author_email); -sub usage() { +sub usage(;$) { + my $msg = shift; + print(STDERR "Error: $msg\n") if $msg; print STDERR <