public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] dim: Automatically sign-off patches from others
@ 2016-01-25 17:27 Tvrtko Ursulin
  2016-01-25 18:43 ` Daniel Vetter
  0 siblings, 1 reply; 3+ messages in thread
From: Tvrtko Ursulin @ 2016-01-25 17:27 UTC (permalink / raw)
  To: Intel-gfx; +Cc: Daniel Vetter

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

It is very easy to forget that commiters should sign-off
patches not authored by themselves.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 dim | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dim b/dim
index c749cebd1187..ff5d89ca5df8 100755
--- a/dim
+++ b/dim
@@ -380,7 +380,11 @@ function dim_apply
 
 	dim_shell_checkpatch "cat $file"
 
-	cat $file | git am -3 "$@"
+	local commiter_email=$(git config --get user.email)
+	local patch_from=$(grep "From:" "$file" | head -1)
+	[[ "$patch_from" == *"$commiter_email"* ]] || sob=-s
+
+	cat $file | git am -3 $sob "$@"
 
 	if [ -n "$message_id" ]; then
 		commit_add_tag "Link" "http://patchwork.freedesktop.org/patch/msgid/$message_id"
-- 
1.9.1

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

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

end of thread, other threads:[~2016-01-26 10:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-25 17:27 [PATCH] dim: Automatically sign-off patches from others Tvrtko Ursulin
2016-01-25 18:43 ` Daniel Vetter
2016-01-26 10:22   ` [PATCH v2] " Tvrtko Ursulin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox