Johannes Schindelin  committed 750a09a

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 <>

  • Participants
  • Parent commits acfcb8d
  • Branches master

Comments (0)

Files changed (1)

File git-cvsimport.perl

 	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';