Re: [PATCH v2] dim: add checks for author and committer sign-off-by

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 26, 2017 at 02:07:49PM +0200, Benjamin Gaignard wrote:
> Add checks for author and committer sign-off-by.
> Add a check for "Link" tag added by dim apply-branch.
> 
> Use real names for people with many different email addresses.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxx>
> ---
> version 2:
> - keep the same logic than before for reviewed/acked-by checks
> - use real names

Thanks for respinning, applied&pushed.
-Daniel

> 
>  dim | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/dim b/dim
> index 786fe6b..c0cbe35 100755
> --- a/dim
> +++ b/dim
> @@ -662,13 +662,32 @@ function checkpatch_commit_push
>  
>  	sha1=$1
>  
> +	# use real names for people with many different email addresses
> +	author=$(git show -s $sha1 --format="format:%an")
> +	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"
> +	fi
> +
> +	# check for committer sign-off
> +	if ! git show -s $sha1 | grep -qi "S.*-by:.*$committer"  ; then
> +		warn_or_fail "$sha1 is lacking committer of sign-off"
> +	fi
> +
> +	# check for Link tag
> +	if ! git show -s $sha1 | grep -qi 'Link:'  ; then
> +		warn_or_fail "$sha1 is lacking of link tag"
> +	fi
> +
>  	# check for a-b/r-b tag
>  	if git show -s $sha1 | grep -qi '\(reviewed\|acked\)\S*-by:'  ; then
>  		return
>  	fi
>  
>  	# check for committer != author
> -	if [[ $(git show -s $sha1 --format="format:%ce") != $(git show -s $sha1 --format="format:%ae") ]]; then
> +	if [[ $committer  != $author ]]; then
>  		return
>  	fi
>  
> -- 
> 1.9.1
> 

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux