From 7bf77644e70d881f407c77e6d65ebe70c90916d6 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Fri, 6 Apr 2007 23:52:41 +0200 Subject: cvsimport: Improve usage error reporting 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 Signed-off-by: Junio C Hamano --- git-cvsimport.perl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/git-cvsimport.perl b/git-cvsimport.perl index d3fbcbc15c..ac74bc51b3 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 <