From 5d54ac9bb02e420d28d4b784fc99503c23fbaab1 Mon Sep 17 00:00:00 2001 From: Marius Storm-Olsen Date: Wed, 1 Jun 2011 11:02:53 -0500 Subject: [PATCH] Remove silly "goto" usage in foreach loop --- init-repository | 6 ++---- 1 file 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) {