From: Junio C Hamano Date: Mon, 03 Nov 2008 23:34:02 GMT Subject: Re: [PATCH] contrib/hooks/post-receive-email: Make revision display configurable Message-ID: <7vy700tmdx.fsf@gitster.siamese.dyndns.org> In-Reply-To: <1225668059-12670-1-git-send-email-pgit@pcharlan.com> Pete Harlan writes: > Add configuration option hooks.showrev, letting the user override how > revisions will be shown in the commit email. > > Signed-off-by: Pete Harlan > Acked-By: Andy Parkins > @@ -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