Skip to contentSkip to conversation

Git.pm: add missing semicolon

FYI/PATCH Lea Wiemann 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

---

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.

perl/Git.pm +1 -1
index 97e61ef..ea6f13f 100644
@@ -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};
 	}
Signature · 1 line
1.5.6.rc2.51.g3f3f7.dirty