aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-10-22 10:38:27 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-10-23 16:41:27 +0200
commit8ad2c0f0f8996fe71826c1cc79e509ad6a94d2d4 (patch)
tree2fd8971ca2facfc6554d3a6d2abd907df5715d54
parent107684c05d80c457aa6e81d090b36a1a294110ec (diff)
get_maintainer.pl: move git loop under "if ($email) {"
All checks in the loop are guarded by that condition, and there is a handy "if" just below. Simplify the code. Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rwxr-xr-xscripts/get_maintainer.pl19
1 files changed, 9 insertions, 10 deletions
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 38334de875..906dcbe468 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -651,18 +651,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;