{"thread":{"id":"4242","subject":"[PATCH] cvsimport: replace anonymous sub ref with a normal sub","startedAt":"2006-05-22T12:45:39Z","lastAt":"2006-05-22T12:45:39Z","messageCount":1,"participants":["Martin Langhoff"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"20444","messageId":"11483019392683-git-send-email-martin@catalyst.net.nz","threadId":"4242","inReplyTo":null,"subject":"[PATCH] cvsimport: replace anonymous sub ref with a normal sub","fromName":"Martin Langhoff","fromEmail":"martin@catalyst.net.nz","sentAt":"2006-05-22T12:45:39Z","receivedAt":"2006-05-22T12:45:39Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"commit() does not need to be an anonymous subreference. Keep it simple.\n\nSigned-off-by: Martin Langhoff <martin@catalyst.net.nz>\n\n\n---\n\n git-cvsimport.perl |    6 +++---\n 1 files changed, 3 insertions(+), 3 deletions(-)\n\na0bbc1c2010ca46fc215453d5e4c4853c679f950\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex c1923d1..2ecfe14 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -563,7 +563,7 @@ my $state = 0;\n \n my($patchset,$date,$author_name,$author_email,$branch,$ancestor,$tag,$logmsg);\n my(@old,@new,@skipped);\n-my $commit = sub {\n+sub commit {\n \tmy $pid;\n \twhile(@old) {\n \t\tmy @o2;\n@@ -853,7 +853,7 @@ #\tVERSION:1.96->1.96.2.1\n \t\tif ($opt_L && $commitcount++ >= $opt_L) {\n \t\t\tlast;\n \t\t}\n-\t\t&$commit();\n+\t\tcommit();\n \t\t$state = 1;\n \t} elsif($state == 11 and /^-+$/) {\n \t\t$state = 1;\n@@ -863,7 +863,7 @@ #\tVERSION:1.96->1.96.2.1\n \t\tprint \"* UNKNOWN LINE * $_\\n\";\n \t}\n }\n-&$commit() if $branch and $state != 11;\n+commit() if $branch and $state != 11;\n \n unlink($git_index);\n \n-- \n1.3.2.g82000\n"}]}