From: Johannes Schindelin Date: Wed, 19 Oct 2005 07:01:02 +0000 (-0700) Subject: Fix cvsimport warning when called without --no-cvs-direct X-Git-Tag: v0.99.8f~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/750a09a7de63c92868cff41a3151eac320c77fa0?hp=--cc Fix cvsimport warning when called without --no-cvs-direct Perl was warning that $opt_p was undefined in that case. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- 750a09a7de63c92868cff41a3151eac320c77fa0 diff --git a/git-cvsimport.perl b/git-cvsimport.perl index f7c3a51593..f00f7596b7 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -487,7 +487,7 @@ ($$) my @opt; @opt = split(/,/,$opt_p) if defined $opt_p; unshift @opt, '-z', $opt_z if defined $opt_z; - unless ($opt_p =~ m/--no-cvs-direct/) { + unless (defined($opt_p) && $opt_p =~ m/--no-cvs-direct/) { push @opt, '--cvs-direct'; } exec("cvsps",@opt,"-u","-A",'--root',$opt_d,$cvs_tree);