[libcamera-devel] utils: hooks: pre-push: Accept Acked-by in addition to Reviewed-by

Message ID 20201002004349.13258-1-laurent.pinchart@ideasonboard.com
State Accepted
Commit ef4bc8d101d1958fc50c1cc84b607a0edd7f621f
Headers show
Series
  • [libcamera-devel] utils: hooks: pre-push: Accept Acked-by in addition to Reviewed-by
Related show

Commit Message

Laurent Pinchart Oct. 2, 2020, 12:43 a.m. UTC
Allow pushing commits that have no Reviewed-by tag but have at least one
Acked-by tag.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 utils/hooks/pre-push | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Kieran Bingham Oct. 2, 2020, 9:16 a.m. UTC | #1
Hi Laurent,

On 02/10/2020 01:43, Laurent Pinchart wrote:
> Allow pushing commits that have no Reviewed-by tag but have at least one
> Acked-by tag.

Yup, in the past I've just skipped the checks using --no-verify - but I
think this is a better solution :-)

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  utils/hooks/pre-push | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push
> index 5dc8addabeb6..2417d379db4c 100755
> --- a/utils/hooks/pre-push
> +++ b/utils/hooks/pre-push
> @@ -57,10 +57,10 @@ do
>  			errors=$((errors+1))
>  		fi
>  
> -		# 3. A Reviewed-by is required.
> -		if ! echo "$msg" | grep -q '^Reviewed-by: '
> +		# 3. A Reviewed-by or Acked-by is required.
> +		if ! echo "$msg" | grep -q '^\(Reviewed\|Acked\)-by: '
>  		then
> -			echo >&2 "No Reviewed-by in commit $commit"
> +			echo >&2 "No Reviewed-by or Acked-by in commit $commit"
>  			errors=$((errors+1))
>  		fi
>  	done
>
Niklas Söderlund Oct. 2, 2020, 12:17 p.m. UTC | #2
Hi Laurent,

Thanks for your work.

On 2020-10-02 03:43:49 +0300, Laurent Pinchart wrote:
> Allow pushing commits that have no Reviewed-by tag but have at least one
> Acked-by tag.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

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

> ---
>  utils/hooks/pre-push | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push
> index 5dc8addabeb6..2417d379db4c 100755
> --- a/utils/hooks/pre-push
> +++ b/utils/hooks/pre-push
> @@ -57,10 +57,10 @@ do
>  			errors=$((errors+1))
>  		fi
>  
> -		# 3. A Reviewed-by is required.
> -		if ! echo "$msg" | grep -q '^Reviewed-by: '
> +		# 3. A Reviewed-by or Acked-by is required.
> +		if ! echo "$msg" | grep -q '^\(Reviewed\|Acked\)-by: '
>  		then
> -			echo >&2 "No Reviewed-by in commit $commit"
> +			echo >&2 "No Reviewed-by or Acked-by in commit $commit"
>  			errors=$((errors+1))
>  		fi
>  	done
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/utils/hooks/pre-push b/utils/hooks/pre-push
index 5dc8addabeb6..2417d379db4c 100755
--- a/utils/hooks/pre-push
+++ b/utils/hooks/pre-push
@@ -57,10 +57,10 @@  do
 			errors=$((errors+1))
 		fi
 
-		# 3. A Reviewed-by is required.
-		if ! echo "$msg" | grep -q '^Reviewed-by: '
+		# 3. A Reviewed-by or Acked-by is required.
+		if ! echo "$msg" | grep -q '^\(Reviewed\|Acked\)-by: '
 		then
-			echo >&2 "No Reviewed-by in commit $commit"
+			echo >&2 "No Reviewed-by or Acked-by in commit $commit"
 			errors=$((errors+1))
 		fi
 	done