From: Junio C Hamano <gitster@pobox•com>
To: Jon Jensen <jon@endpoint•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] Add option hooks.emaildiff to include full diff in post-receive-email
Date: Wed, 03 Aug 2011 11:52:49 -0700 [thread overview]
Message-ID: <7vr552ba4e.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1108022132230.3386@ybpnyubfg6.ybpnyqbznva6> (Jon Jensen's message of "Tue, 2 Aug 2011 21:34:48 -0600 (MDT)")
Jon Jensen <jon@endpoint•com> 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
next prev parent reply other threads:[~2011-08-03 18:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-03 3:34 [PATCH] Add option hooks.emaildiff to include full diff in post-receive-email Jon Jensen
2011-08-03 18:52 ` Junio C Hamano [this message]
2011-08-04 3:36 ` [PATCH] Add option hooks.diffopts to customize change summary " Jon Jensen
-- strict thread matches above, loose matches on Subject: below --
2008-08-11 21:20 [PATCH] Add option hooks.emaildiff to include full diff " Jon Jensen
2008-08-11 21:01 Jon Jensen
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=7vr552ba4e.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=jon@endpoint$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox