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

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

 



Jon Jensen <jon@xxxxxxxxxxxx> 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
--
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]