git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lea Wiemann <lewiemann@gmail.com>
To: git@vger.kernel.org
Cc: Lea Wiemann <LeWiemann@gmail.com>
Subject: [FYI/PATCH] Git.pm: add missing semicolon
Date: Sat, 14 Jun 2008 01:22:46 +0200	[thread overview]
Message-ID: <1213399366-3539-1-git-send-email-LeWiemann@gmail.com> (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.

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

                 reply	other threads:[~2008-06-13 23:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1213399366-3539-1-git-send-email-LeWiemann@gmail.com \
    --to=lewiemann@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).