Re: [PATCH/RFC] Restore line limit option in post-receive-email

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

 



Cheng Leong <leongc@xxxxxxxxxxxxxxx> writes:

> The hooks.emailmaxlines config currently has no effect. Stop
> prep_for_email from clobbering the already-initialized maxlines
> variable in the contrib/hooks/post-receive-email example.
>
> Signed-off-by: Cheng Leong <leongc@xxxxxxxxxxxxxxx>
> ---
>  contrib/hooks/post-receive-email |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
> index ba077c1..ac2e0ed 100755
> --- a/contrib/hooks/post-receive-email
> +++ b/contrib/hooks/post-receive-email
> @@ -85,7 +85,6 @@ prep_for_email()
>  	oldrev=$(git rev-parse $1)
>  	newrev=$(git rev-parse $2)
>  	refname="$3"
> -	maxlines=$4
>  
>  	# --- Interpret
>  	# 0000->1234 (create)

Umm, there is another place where $maxlines is used without
merit. Shouldn't we do something like below as well?

 contrib/hooks/post-receive-email |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index ba077c1..e27ca3c 100755
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -743,6 +743,6 @@ else
 	while read oldrev newrev refname
 	do
 		prep_for_email $oldrev $newrev $refname || continue
-		generate_email $maxlines | send_mail
+		generate_email | send_mail
 	done
 fi
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]