summaryrefslogtreecommitdiffstats
path: root/init-repository
diff options
context:
space:
mode:
authorMarius Storm-Olsen <marius.storm-olsen@nokia.com>2011-06-01 11:02:53 -0500
committerMarius Storm-Olsen <marius.storm-olsen@nokia.com>2011-06-01 11:02:53 -0500
commit5d54ac9bb02e420d28d4b784fc99503c23fbaab1 (patch)
tree7f665afd97445807c5544cce7b7d4384fe13534d /init-repository
parent3c8d0ab74eeb32153198f816a732bd016954bc80 (diff)
Remove silly "goto" usage in foreach loop
Diffstat (limited to 'init-repository')
-rwxr-xr-xinit-repository6
1 files changed, 2 insertions, 4 deletions
diff --git a/init-repository b/init-repository
index 2d4e15cb..999fdf96 100755
--- a/init-repository
+++ b/init-repository
@@ -366,10 +366,9 @@ sub git_set_submodule_config
my $protocol = $self->{protocol};
my $url_base_for_protocol = $PROTOCOLS{$protocol};
- GITCONFIG:
foreach my $line (@configresult) {
# Example line: submodule.qtqa.url=git://gitorious.org/qt/qtqa.git
- next GITCONFIG if ($line !~ /(submodule\.[^.=]+\.url)=(.*)/);
+ next if ($line !~ /(submodule\.[^.=]+\.url)=(.*)/);
my $key = $1;
my $value = $2;
@@ -429,10 +428,9 @@ sub git_add_staging_remote
my @staging = grep { /^$repo_basename$/; } keys %STAGING_REPOS;
- STAGING:
foreach my $staging_repo (@staging) {
# nothing to do if remote already exists
- next STAGING if ($current_remotes{$staging_repo});
+ next if ($current_remotes{$staging_repo});
my $staging_repo_url = $STAGING_REPOS{$staging_repo};
if ($protocol) {