summaryrefslogtreecommitdiff
path: root/sync-all
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2013-11-21 13:14:56 +0000
committerJoachim Breitner <mail@joachim-breitner.de>2013-11-21 13:16:03 +0000
commit9c2dade94fae5f4fe19cd972ca1f1049c633e4ed (patch)
tree949caa48c93dae1a81c77a90ab008272b76c9083 /sync-all
parent6200809210bcca734092a1524665b7bce0239203 (diff)
downloadhaskell-9c2dade94fae5f4fe19cd972ca1f1049c633e4ed.tar.gz
Fix branch name check regex 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 c316e64691..38a840d533 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 =~ m!^[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 =~ m!^[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");
}
@@ -541,7 +541,7 @@ sub gitall {
print (' ' x (40 - length($localpath)));
my $branch = &readgit($localpath, "rev-parse", "--abbrev-ref", "HEAD");
die "Bad branch: $branch"
- unless $branch =~ m!^[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:]].*//;