CC: | Tim.Bunce [...] pobox.com |
Subject: | [PATCH] Fixed git-cpan-which to not return leading space. |
Date: | Mon, 31 May 2010 22:13:25 +0100 |
To: | bug-Git-CPAN-Patch [...] rt.cpan.org |
From: | Tim <Tim.Bunce [...] pobox.com> |
From: Tim Bunce <Tim.Bunce@pobox.com>
I'm using git version 1.7.0.4. I used git cpan patch on the CGI
module but sendpatch failed because git-cpan-which was returning
" CGI". Perhaps the right fix is deeper - in whatever set
'git-cpan-module:' for example.
---
scripts/git-cpan-which | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/git-cpan-which b/scripts/git-cpan-which
index 0f3a180..7a5b14c 100755
--- a/scripts/git-cpan-which
+++ b/scripts/git-cpan-which
@@ -24,7 +24,7 @@ my $last_commit = $repo->command_oneline('rev-parse', '--verify', 'cpan/master')
my $last = join "\n", $repo->command( log => '--pretty=format:%b', '-n', 1, $last_commit );
-$last =~ /git-cpan-module:\ (.*?) \s+ git-cpan-version:\ (.*?) \s*$/sx
+$last =~ /git-cpan-module: \s+ (.*?) \s+ git-cpan-version:\ (.*?) \s*$/sx
or die "Couldn't parse message:\n$last\n";
say $1;
--
1.7.0.4