qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com, mst@redhat.com
Subject: [Qemu-devel] [PATCH 3/4] get_maintainer.pl: move git loop under "if ($email) {"
Date: Wed, 22 Oct 2014 11:08:21 +0200	[thread overview]
Message-ID: <1413968902-24094-4-git-send-email-pbonzini@redhat.com> (raw)
In-Reply-To: <1413968902-24094-1-git-send-email-pbonzini@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 <pbonzini@redhat.com>
---
 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

  parent reply	other threads:[~2014-10-22  9:08 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22  9:08 [Qemu-devel] [PATCH 0/4] small improvements to get_maintainer.pl Paolo Bonzini
2014-10-22  9:08 ` [Qemu-devel] [PATCH 1/4] get_maintainer.pl: exit with status 1 if no maintainer found Paolo Bonzini
2014-10-22 12:09   ` Markus Armbruster
2014-10-22 12:32     ` Paolo Bonzini
2014-10-22  9:08 ` [Qemu-devel] [PATCH 2/4] get_maintainer.pl: treat all M entries the same Paolo Bonzini
2014-10-22  9:24   ` Michael S. Tsirkin
2014-10-22  9:08 ` Paolo Bonzini [this message]
2014-10-22  9:08 ` [Qemu-devel] [PATCH 4/4] get_maintainer.pl: point at --git-fallback instead of enabling it automatically Paolo Bonzini
2014-10-22  9:33   ` Michael S. Tsirkin
2014-10-22  9:56     ` Paolo Bonzini
2014-10-22 10:13       ` Thomas Huth
2014-10-22 10:17       ` Michael S. Tsirkin
2014-10-22 10:30         ` Paolo Bonzini
2014-10-22 12:55           ` Markus Armbruster
2014-10-22 10:17 ` [Qemu-devel] [PATCH 0/4] small improvements to get_maintainer.pl Thomas Huth
2014-10-22 10:28   ` Michael S. Tsirkin
2014-10-22 10:42     ` Paolo Bonzini
2014-10-22 12:57 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413968902-24094-4-git-send-email-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).