git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] contrib/hooks/post-receive-email: Make revision display configurable

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 3, 2008, 23:34 UTC
Message-ID
<7vy700tmdx.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1225668059-12670-1-git-send-email-pgit@pcharlan.com>
Pete Harlan <pgit@pcharlan.com> writes:
Show 18 quoted lines
> Add configuration option hooks.showrev, letting the user override how
> revisions will be shown in the commit email.
>
> Signed-off-by: Pete Harlan <pgit@pcharlan.com>
> Acked-By: Andy Parkins <andyparkins@gmail.com>
> @@ -390,8 +396,13 @@ generate_update_branch_email()
>  
>  		echo ""
>  		echo $LOGBEGIN
> -		git rev-parse --not --branches | grep -v $(git rev-parse $refname) |
> -		git rev-list --pretty --stdin $oldrev..$newrev
> +		git rev-parse --not --branches |
> +			grep -v $(git rev-parse $refname) |
> +			git rev-list --stdin $oldrev..$newrev |
> +		while read onerev
> +		do
> +			eval $(printf "$showrev" $onerev)
> +		done

This would make the default "non-custom" case much less efficient. If we really cared, perhaps we could do something like this...

	git rev-parse --not --branches |
        grep -v "^$(git-rev-parse --not $refname)\$" |
        case "$using_custom_showrev" in
        yes)
		git rev-list --stdin $oldrev..$newrev |
        	while read onerev
                do
                done
                ;;
	*)
        	git rev-list --pretty --stdin $oldrev..newrev
                ;;
	esac
But I suspect we do not care too much about it.
Will apply as submitted.  Thanks
Previous: Andy ParkinsNext: Pete Harlan
Message 5 of 6 in “contrib/hooks/post-receive-email: Make revision display configurable”
  1. contrib/hooks/post-receive-email: Make revision display configurablePete Harlan, Nov 2, 2008
  2. Pete HarlanNov 2, 2008
  3. Pete HarlanNov 3, 2008
  4. Andy ParkinsNov 3, 2008
  5. Junio C HamanoNov 3, 2008
  6. Pete HarlanNov 4, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.