cvsimport: replace anonymous sub ref with a normal sub
commit() does not need to be an anonymous subreference. Keep it simple. Signed-off-by: Martin Langhoff <martin@catalyst.net.nz> Signed-off-by: Junio C Hamano <junkio@cox.net>maint
parent
f396f01f11
commit
c4b16f8d77
|
@ -563,7 +563,7 @@ my $state = 0;
|
||||||
|
|
||||||
my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
|
my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
|
||||||
my(@old,@new,@skipped);
|
my(@old,@new,@skipped);
|
||||||
my $commit = sub {
|
sub commit {
|
||||||
my $pid;
|
my $pid;
|
||||||
while(@old) {
|
while(@old) {
|
||||||
my @o2;
|
my @o2;
|
||||||
|
@ -852,7 +852,7 @@ while(<CVS>) {
|
||||||
} elsif($state == 9 and /^\s*$/) {
|
} elsif($state == 9 and /^\s*$/) {
|
||||||
$state = 10;
|
$state = 10;
|
||||||
} elsif(($state == 9 or $state == 10) and /^-+$/) {
|
} elsif(($state == 9 or $state == 10) and /^-+$/) {
|
||||||
&$commit();
|
commit();
|
||||||
$state = 1;
|
$state = 1;
|
||||||
} elsif($state == 11 and /^-+$/) {
|
} elsif($state == 11 and /^-+$/) {
|
||||||
$state = 1;
|
$state = 1;
|
||||||
|
@ -862,7 +862,7 @@ while(<CVS>) {
|
||||||
print "* UNKNOWN LINE * $_\n";
|
print "* UNKNOWN LINE * $_\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&$commit() if $branch and $state != 11;
|
commit() if $branch and $state != 11;
|
||||||
|
|
||||||
unlink($git_index);
|
unlink($git_index);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue