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>
Martin Langhoff committed
May 23, 2006 at 00:45 UTC
c4b16f8d7786c2a9655636779ce4e3e89f0df86c
1 file changed
+3
-3
git-cvsimport.perl
+3
-3
@@ -563,7 +563,7 @@ my $state = 0;
563
564
my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
565
my(@old,@new,@skipped);
566
-my $commit = sub {
566
+sub commit {
567
my $pid;
568
while(@old) {
569
my @o2;
@@ -852,7 +852,7 @@ while(<CVS>) {
852
} elsif($state == 9 and /^\s*$/) {
853
$state = 10;
854
} elsif(($state == 9 or $state == 10) and /^-+$/) {
855
- &$commit();
855
+ commit();
856
$state = 1;
857
} elsif($state == 11 and /^-+$/) {
858
$state = 1;
@@ -862,7 +862,7 @@ while(<CVS>) {
862
print "* UNKNOWN LINE * $_\n";
863
}
864
}
865
-&$commit() if $branch and $state != 11;
865
+commit() if $branch and $state != 11;
866
867
unlink($git_index);
868