git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [FYI/PATCH] Git.pm: add missing semicolon
@ 2008-06-13 23:22 Lea Wiemann
  0 siblings, 0 replies; only message in thread
From: Lea Wiemann @ 2008-06-13 23:22 UTC (permalink / raw)
  To: git; +Cc: Lea Wiemann

---

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-13 23:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-13 23:22 [FYI/PATCH] Git.pm: add missing semicolon Lea Wiemann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).