summaryrefslogtreecommitdiff
path: root/sync-all
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2013-09-17 15:45:48 +0200
committerJoachim Breitner <mail@joachim-breitner.de>2013-09-17 15:45:48 +0200
commit4e2f6c27c89852756a39ab1190560f0311576b3f (patch)
treef08bbce791184aac0ef95e4475f72a39611f652b /sync-all
parentb6477001fce89ecd4c3e61cb76440ac43e069c95 (diff)
downloadhaskell-4e2f6c27c89852756a39ab1190560f0311576b3f.tar.gz
Allow branches with / in them (e.g. wip/) in ./sync-all
Diffstat (limited to 'sync-all')
-rwxr-xr-xsync-all6
1 files changed, 3 insertions, 3 deletions
diff --git a/sync-all b/sync-all
index f37c37996c..55b737cce4 100755
--- a/sync-all
+++ b/sync-all
@@ -163,14 +163,14 @@ sub getrepo {
my $git_dir = $bare_flag ? "ghc.git" : ".";
my $branch = &readgit($git_dir, "rev-parse", "--abbrev-ref", "HEAD");
die "Bad branch: $branch"
- unless $branch =~ /^[a-zA-Z][a-zA-Z0-9.-]*$/;
+ unless $branch =~ m!^[a-zA-Z][a-zA-Z0-9.-/]*$!;
my $remote = &readgit($git_dir, "config", "branch.$branch.remote");
if ($remote eq "") {
# remotes are not mandatory for branches (e.g. not recorded by default for bare repos)
$remote = "origin";
}
die "Bad remote: $remote"
- unless $remote =~ /^[a-zA-Z][a-zA-Z0-9.-]*$/;
+ unless $remote =~ m!^[a-zA-Z][a-zA-Z0-9.-/]*$!;
$repo = &readgit($git_dir, "config", "remote.$remote.url");
}
@@ -539,7 +539,7 @@ sub gitall {
print (' ' x (40 - length($localpath)));
my $branch = &readgit($localpath, "rev-parse", "--abbrev-ref", "HEAD");
die "Bad branch: $branch"
- unless $branch =~ /^[a-zA-Z][a-zA-Z0-9.-]*$/;
+ unless $branch =~ m!^[a-zA-Z][a-zA-Z0-9.-/]*$!;
my $us = &readgit(".", "ls-remote", $localpath, "refs/heads/$branch");
my $them = &readgit(".", "ls-remote", $compareto, "refs/heads/$branch");
$us =~ s/[[:space:]].*//;