From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56129) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgruK-0000Ku-VI for qemu-devel@nongnu.org; Wed, 22 Oct 2014 05:08:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XgruF-0006Ce-Gz for qemu-devel@nongnu.org; Wed, 22 Oct 2014 05:08:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XgruF-0006CT-9z for qemu-devel@nongnu.org; Wed, 22 Oct 2014 05:08:35 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9M98Xwm020175 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 22 Oct 2014 05:08:34 -0400 From: Paolo Bonzini Date: Wed, 22 Oct 2014 11:08:21 +0200 Message-Id: <1413968902-24094-4-git-send-email-pbonzini@redhat.com> In-Reply-To: <1413968902-24094-1-git-send-email-pbonzini@redhat.com> References: <1413968902-24094-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 3/4] get_maintainer.pl: move git loop under "if ($email) {" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: armbru@redhat.com, mst@redhat.com All checks in the loop are guarded by that condition, and there is a handy "if" just below. Simplify the code. Signed-off-by: Paolo Bonzini --- scripts/get_maintainer.pl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index 6c5a73b..7c6d186 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl @@ -632,18 +632,17 @@ sub get_maintainers { $email->[0] = deduplicate_email($email->[0]); } - foreach my $file (@files) { - if ($email && - ($email_git || ($email_git_fallback && - !$exact_pattern_match_hash{$file}))) { - vcs_file_signoffs($file); - } - if ($email && $email_git_blame) { - vcs_file_blame($file); + if ($email) { + foreach my $file (@files) { + if ($email_git || ($email_git_fallback && + !$exact_pattern_match_hash{$file})) { + vcs_file_signoffs($file); + } + if ($email_git_blame) { + vcs_file_blame($file); + } } - } - if ($email) { foreach my $chief (@penguin_chief) { if ($chief =~ m/^(.*):(.*)/) { my $email_address; -- 1.8.3.1