[libcamera-devel] [PATCH] utils: hooks: pre-push: Reject commits with a Change-Id

Niklas Söderlund niklas.soderlund at ragnatech.se
Fri Oct 30 10:51:45 CET 2020


Hi Laurent,

Thanks for your patch.

On 2020-10-30 03:37:35 +0200, Laurent Pinchart wrote:
> We're not using gerrit, so let's prevent Change-Id tags creeping in
> unadvertently.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>

> ---
>  utils/hooks/pre-push | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push
> index 2417d379db4c..d13e2c3b506c 100755
> --- a/utils/hooks/pre-push
> +++ b/utils/hooks/pre-push
> @@ -63,6 +63,13 @@ do
>  			echo >&2 "No Reviewed-by or Acked-by in commit $commit"
>  			errors=$((errors+1))
>  		fi
> +
> +		# 4. The commit message shall not contain a Change-Id.
> +		if echo "$msg" | grep -q '^Change-Id:'
> +		then
> +			echo >&2 "Found Change-Id in commit $commit"
> +			errors=$((errors+1))
> +		fi
>  	done
>  
>  	if [ $errors != 0 ]
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list