Subject: Re: [PATCH] Add option hooks.emaildiff to include full diff in post-receive-email

From: Junio C Hamano <[email-masked]>
Date: Wed, 03 Aug 2011 11:52:49 -0700

Jon Jensen <[email-masked]> writes:

> -	echo "Summary of changes:"
> -	git diff-tree --stat --summary --find-copies-harder $oldrev..$newrev
> +	if [ -n "$emaildiff" ]; then
> +		echo "Summary of changes and diff:"
> +		git diff-tree --stat --summary --find-copies-harder -p $oldrev..$newrev
> +	else
> +		echo "Summary of changes:"
> +		git diff-tree --stat --summary --find-copies-harder $oldrev..$newrev
> +	fi

Depending on the project, people may want to customize other aspects of
the summary generation, e.g. rejecting the overhead of -f-c-h.

Why not do it like this intead?

	diffopts=$(git config hooks.diffopts)
	: ${diffopts:="--stat --summary --find-copies-harder"}
        
	echo "Summary of changes:"
        git diff-tree $diffopts $oldrev..$newrev