intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dim: Accept author x signed-off based on email, but warn.
@ 2017-09-19 17:48 Rodrigo Vivi
  2017-09-20  7:56 ` Jani Nikula
  2017-09-20 11:02 ` Joonas Lahtinen
  0 siblings, 2 replies; 13+ messages in thread
From: Rodrigo Vivi @ 2017-09-19 17:48 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Rodrigo Vivi

It seems Patchwork or SMTP servers are messing some patches
and changing the original git's author name on git per "Last, First".
So we end up with a mismatch were signed-off uses one name format
and author is using another format.

So, let's check for email addresses instead.

However let's continue to WARN so commiters can take action on it
before pushing patch upstream with incorrect "Last, First" name.

Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 dim | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dim b/dim
index dbaeb1ec944d..13cc5f00209d 100755
--- a/dim
+++ b/dim
@@ -690,11 +690,16 @@ function checkpatch_commit_push
 
 	# use real names for people with many different email addresses
 	author=$(git show -s $sha1 --format="format:%an")
+	author_email=$(git show -s $sha1 --format="format:%ae")
 	committer=$(git show -s $sha1 --format="format:%cn")
 
 	# check for author sign-off
 	if ! git show -s $sha1 | grep -qi "S.*-by:.*$author"  ; then
-		warn_or_fail "$sha1 is lacking author of sign-off"
+		if git show -s $sha1 | grep -qi "S.*-by:.*$author_email"  ; then
+			echoerr "WARNING: Author name mismatch. Patchwork or SMTP messing it up. Consider fixing it before pushing it."
+		else
+			warn_or_fail "$sha1 is lacking author of sign-off"
+		fi
 	fi
 
 	# check for committer sign-off
-- 
2.13.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-09-27 15:39 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-19 17:48 [PATCH] dim: Accept author x signed-off based on email, but warn Rodrigo Vivi
2017-09-20  7:56 ` Jani Nikula
2017-09-20 11:02 ` Joonas Lahtinen
2017-09-20 11:51   ` Jani Nikula
2017-09-20 12:46     ` Rodrigo Vivi
2017-09-20 12:49     ` [PATCH] dim: Accept author x signed-off based on email Rodrigo Vivi
2017-09-21 11:12       ` Jani Nikula
2017-09-21 13:27         ` Rodrigo Vivi
2017-09-26 11:59           ` Daniel Vetter
2017-09-26 13:24             ` Jani Nikula
2017-09-26 16:55               ` Rodrigo Vivi
2017-09-27 12:14                 ` Daniel Vetter
2017-09-27 15:39                   ` Rodrigo Vivi

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).