public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] dim: Automatically sign-off patches from others
Date: Mon, 25 Jan 2016 19:43:52 +0100	[thread overview]
Message-ID: <20160125184352.GU11240@phenom.ffwll.local> (raw)
In-Reply-To: <1453742829-23266-1-git-send-email-tvrtko.ursulin@linux.intel.com>

On Mon, Jan 25, 2016 at 05:27:09PM +0000, Tvrtko Ursulin wrote:
> 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

I'd use real control flow here to hide the sob=-s less. Also

	local sob

With that lgtm.
-Daniel

> +
> +	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
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-01-25 18:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-25 17:27 [PATCH] dim: Automatically sign-off patches from others Tvrtko Ursulin
2016-01-25 18:43 ` Daniel Vetter [this message]
2016-01-26 10:22   ` [PATCH v2] " Tvrtko Ursulin

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=20160125184352.GU11240@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=tvrtko.ursulin@linux.intel.com \
    /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