[commit: ghc] master: Make sync-all handle all github protocols correctly (3efcb0a)

git at git.haskell.org git at git.haskell.org
Fri Mar 7 15:54:24 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/3efcb0a7d147e05f86501783144bcd0ad3757e93/ghc

>---------------------------------------------------------------

commit 3efcb0a7d147e05f86501783144bcd0ad3757e93
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Mar 7 16:50:43 2014 +0100

    Make sync-all handle all github protocols correctly
    
    This fixes #8824.


>---------------------------------------------------------------

3efcb0a7d147e05f86501783144bcd0ad3757e93
 sync-all |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sync-all b/sync-all
index 469dabe..a585e9a 100755
--- a/sync-all
+++ b/sync-all
@@ -19,6 +19,8 @@ my $bare_flag = ""; # NOT the opposite of checked_out_flag (describes local repo
 
 my %tags;
 
+my $GITHUB = qr!(?:git@|git://|https://)github.com!;
+
 sub inDir {
     my $dir = shift;
     my $code = shift;
@@ -262,7 +264,7 @@ sub gitall {
 
     my ($repo_base, $checked_out_tree, $repo_local) = getrepo();
 
-    my $is_github_repo = $repo_base =~ m/(git@|git:\/\/|https:\/\/)github.com/;
+    my $is_github_repo = $repo_base =~ $GITHUB;
 
     @args = ();
 
@@ -584,8 +586,8 @@ sub gitInitSubmodules {
 
     my $submodulespaths = &readgit(".", "config", "--get-regexp", "^submodule[.].*[.]url");
     # if we came from github, change the urls appropriately
-    while ($submodulespaths =~ m!^(submodule.libraries/[a-zA-Z0-9]+.url) git://github.com/ghc/packages/([a-zA-Z0-9]+).git$!gm) {
-        &git(".", "config", $1, "git://github.com/ghc/packages-$2");
+    while ($submodulespaths =~ m!^(submodule.libraries/[a-zA-Z0-9]+.url) ($GITHUB)/ghc/packages/([a-zA-Z0-9]+).git$!gm) {
+        &git(".", "config", $1, "$2/ghc/packages-$3");
     }
 
     # if we came from a local repository, grab our submodules from their



More information about the ghc-commits mailing list