[openssl-commits] [tools] master update

Richard Levitte levitte at openssl.org
Thu Jun 15 15:18:07 UTC 2017


The branch master has been updated
       via  18464ff9f3635d574daa0aeb310a78969db79d8c (commit)
      from  f77de03c5ac4f315f526d80db917255ec50a7f30 (commit)


- Log -----------------------------------------------------------------
commit 18464ff9f3635d574daa0aeb310a78969db79d8c
Author: Richard Levitte <richard at levitte.org>
Date:   Thu Jun 15 17:17:56 2017 +0200

    gitaddrev: correct logic error for --myemail
    
    If the --myemail value is someone with a CLA, they count as a reviewer
    no matter what.  If they are a OMC member, they count as such no
    matter what as well.  However, they still need to be removed from the
    @reviewer list before the commit message is rewritten, since they
    can't have a Reviewed-by line on their own commit.

-----------------------------------------------------------------------

Summary of changes:
 review-tools/gitaddrev | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/review-tools/gitaddrev b/review-tools/gitaddrev
index 64976d1..f539982 100755
--- a/review-tools/gitaddrev
+++ b/review-tools/gitaddrev
@@ -80,16 +80,18 @@ foreach (@ARGV) {
 	if ($rev) {
 	    my $cla = $query->has_cla($rev);
 	    if ($cla) {
-		# If author doesn't match us add us as reviewer
-		if ($ENV{GIT_AUTHOR_EMAIL} ne $1) {
-		    unless (grep {$_ eq $rev} @reviewers) {
-			$omccount++ if $query->is_member_of($1, 'omc');
-			push @reviewers, $rev;
-		    }
-		} else {
-		    # Can't review our own commits, setup this one for removal
+		unless (grep {$_ eq $rev} @reviewers) {
+		    $omccount++ if $query->is_member_of($1, 'omc');
+		    push @reviewers, $rev;
+		}
+
+		# We can't add Reviewed-by: lines with our own name on commits
+		# we have authored ourselves.  However, we need to exist as an
+		# entry in @reviewers so the count check below won't show false
+		# positives, so instead, we set up this reviewer identity for
+		# removal before rewriting the commit message.
+		if ($ENV{GIT_AUTHOR_EMAIL} eq $1) {
 		    $skip_reviewer = $rev;
-		    $omccount-- if $query->is_member_of($1, 'omc');
 		}
 	    } else {
 		push @nocla_reviewers, $1


More information about the openssl-commits mailing list