{"thread":{"id":"13938","subject":"[FYI/PATCH] Git.pm: add missing semicolon","startedAt":"2008-06-13T23:22:46Z","lastAt":"2008-06-13T23:22:46Z","messageCount":1,"participants":["Lea Wiemann"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"79793","messageId":"1213399366-3539-1-git-send-email-LeWiemann@gmail.com","threadId":"13938","inReplyTo":null,"subject":"[FYI/PATCH] Git.pm: add missing semicolon","fromName":"Lea Wiemann","fromEmail":"lewiemann@gmail.com","sentAt":"2008-06-13T23:22:46Z","receivedAt":"2008-06-13T23:22:46Z","isPatch":true,"sender":{"key":"lewiemann@gmail.com","avatar":null},"body":"---\n\nThere is obviously a semicolon missing after the try/catch block;\nwithout the semicolon '$opts{Repository} = abs_path($dir);' becomes an\nargument to the try function.  The code (apparently?) never gets\nexercised in any test case, but I don't understand it well enough to\nwrite a test case or determine whether it's correct now.\n\nHence this patch is not for inclusion (from my end at least).  I'm\nposting it just FYI and in case anyone wants to take a look.\n\ndiff --git a/perl/Git.pm b/perl/Git.pm\nindex 97e61ef..ea6f13f 100644\n--- a/perl/Git.pm\n+++ b/perl/Git.pm\n@@ -207,13 +207,13 @@ sub repository {\n \t\t\tmy $search = Git->repository(Repository => $dir);\n \t\t\ttry {\n \t\t\t\t$search->command('symbolic-ref', 'HEAD');\n \t\t\t} catch Git::Error::Command with {\n \t\t\t\t# Mimick git-rev-parse --git-dir error message:\n \t\t\t\tthrow Error::Simple('fatal: Not a git repository');\n-\t\t\t}\n+\t\t\t};\n \n \t\t\t$opts{Repository} = abs_path($dir);\n \t\t}\n \n \t\tdelete $opts{Directory};\n \t}\n-- \n1.5.6.rc2.51.g3f3f7.dirty\n"}]}