All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Pete Harlan <pgit@pcharlan.com>
Cc: Andy Parkins <andyparkins@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] contrib/hooks/post-receive-email: Make revision display configurable
Date: Mon, 03 Nov 2008 15:34:02 -0800	[thread overview]
Message-ID: <7vy700tmdx.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 1225668059-12670-1-git-send-email-pgit@pcharlan.com

Pete Harlan <pgit@pcharlan.com> writes:

> 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

  parent reply	other threads:[~2008-11-03 23:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-02 23:20 [PATCH] contrib/hooks/post-receive-email: Make revision display configurable Pete Harlan
2008-11-02 23:24 ` Pete Harlan
2008-11-03  9:49   ` Pete Harlan
2008-11-03 18:58 ` Andy Parkins
2008-11-03 23:34 ` Junio C Hamano [this message]
2008-11-04  0:45   ` Pete Harlan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vy700tmdx.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=andyparkins@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pgit@pcharlan.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.