This is an automated email from the git hooks/post-receive script.

abe pushed a commit to annotated tag 0.38
in repository libdist-zilla-plugin-githubmeta-perl.

commit 6be9e72b39608d991438052f38ff1e4146e897b8
Author: Graham Knop <ha...@haarg.org>
Date:   Mon Sep 9 01:37:27 2013 -0400

    use git remote command to fetch remote urls
    
    If the git url.<base>.insteadOf or url.<base>.pushInsteadOf options are
    used, the URL listed in the config directly may not be the real URL used
    for fetching.  The remote command will resolve the real URLs git will be
    using, so use that instead.
---
 lib/Dist/Zilla/Plugin/GithubMeta.pm | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lib/Dist/Zilla/Plugin/GithubMeta.pm 
b/lib/Dist/Zilla/Plugin/GithubMeta.pm
index 3f4be72..5c59423 100644
--- a/lib/Dist/Zilla/Plugin/GithubMeta.pm
+++ b/lib/Dist/Zilla/Plugin/GithubMeta.pm
@@ -125,10 +125,14 @@ sub metadata {
 
 sub _url_for_remote {
   my ($self, $remote) = @_;
-  my $url = `git config --get remote.$remote.url`;
-  chomp $url;
-
-  return $url;
+  my @remote_info = `git remote show -n $remote`;
+  for my $line (@remote_info) {
+    chomp $line;
+    if ($line =~ /^\s*Fetch URL:\s*(.*)/) {
+      return $1;
+    }
+  }
+  return;
 }
 
 sub _under_git {

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libdist-zilla-plugin-githubmeta-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to