From: Martin Langhoff Date: Mon, 22 May 2006 12:45:39 +0000 (+1200) Subject: cvsimport: replace anonymous sub ref with a normal sub X-Git-Tag: v1.4.0-rc1~94 X-Git-Url: https://git.octo.it/?p=git.git;a=commitdiff_plain;h=c4b16f8d7786c2a9655636779ce4e3e89f0df86c 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 Signed-off-by: Junio C Hamano --- diff --git a/git-cvsimport.perl b/git-cvsimport.perl index 282646af..d257e668 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -563,7 +563,7 @@ my $state = 0; 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; @@ -852,7 +852,7 @@ while() { } elsif($state == 9 and /^\s*$/) { $state = 10; } elsif(($state == 9 or $state == 10) and /^-+$/) { - &$commit(); + commit(); $state = 1; } elsif($state == 11 and /^-+$/) { $state = 1; @@ -862,7 +862,7 @@ while() { print "* UNKNOWN LINE * $_\n"; } } -&$commit() if $branch and $state != 11; +commit() if $branch and $state != 11; unlink($git_index);