[FYI/PATCH] Git.pm: add missing semicolon

From: Lea Wiemann <hidden>
Date: 2016-06-15 22:44:44
Subsystem: the rest · Maintainer: Linus Torvalds

---

There is obviously a semicolon missing after the try/catch block;
without the semicolon '$opts{Repository} = abs_path($dir);' becomes an
argument to the try function.  The code (apparently?) never gets
exercised in any test case, but I don't understand it well enough to
write a test case or determine whether it's correct now.

Hence this patch is not for inclusion (from my end at least).  I'm
posting it just FYI and in case anyone wants to take a look.
diff --git a/perl/Git.pm b/perl/Git.pm
index 97e61ef..ea6f13f 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -207,13 +207,13 @@ sub repository {
 			my $search = Git->repository(Repository => $dir);
 			try {
 				$search->command('symbolic-ref', 'HEAD');
 			} catch Git::Error::Command with {
 				# Mimick git-rev-parse --git-dir error message:
 				throw Error::Simple('fatal: Not a git repository');
-			}
+			};
 
 			$opts{Repository} = abs_path($dir);
 		}
 
 		delete $opts{Directory};
 	}
-- 
1.5.6.rc2.51.g3f3f7.dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help