cvsimport: replace anonymous sub ref with a normal sub
authorMartin Langhoff <martin@catalyst.net.nz>
Mon, 22 May 2006 12:45:39 +0000 (00:45 +1200)
committerJunio C Hamano <junkio@cox.net>
Tue, 23 May 2006 01:16:44 +0000 (18:16 -0700)
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>
git-cvsimport.perl
index 282646af3592369ffa36178d239c41e173b123f9..d257e668d6241b03fad0fbffcd4306694017f703 100755 (executable)
@@ -563,7 +563,7 @@ ($$)
 
 my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
 my(@old,@new,@skipped);
 
 my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);
 my(@old,@new,@skipped);
-my $commit = sub {
+sub commit {
        my $pid;
        while(@old) {
                my @o2;
        my $pid;
        while(@old) {
                my @o2;
@@ -852,7 +852,7 @@ ($$)
        } elsif($state == 9 and /^\s*$/) {
                $state = 10;
        } elsif(($state == 9 or $state == 10) and /^-+$/) {
        } elsif($state == 9 and /^\s*$/) {
                $state = 10;
        } elsif(($state == 9 or $state == 10) and /^-+$/) {
-               &$commit();
+               commit();
                $state = 1;
        } elsif($state == 11 and /^-+$/) {
                $state = 1;
                $state = 1;
        } elsif($state == 11 and /^-+$/) {
                $state = 1;
@@ -862,7 +862,7 @@ ($$)
                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);