From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 2/3] Only show log entries for new revisions in hooks--update
Date: Tue, 13 Feb 2007 14:24:06 +0000 [thread overview]
Message-ID: <200702131424.06983.andyparkins@gmail.com> (raw)
If you were issuing emails for two branches, and one merged the other,
you would get the same log messages appearing in two separate emails.
e.g. A working repository, where the last push to central was done at
the revision marked "B", after which two branches were developed
further.
* -- B -- 1 -- 1 -- M (branch1)
\ /
2 -- 2 -- 2 (branch2)
Now imagine that branch2 is pushed to the email-generating repository;
an email containing all the "2" revisions would be sent. Now, let's say
branch1 is pushed, the old update hook would run
git-rev-list $newrev ^$baserev
Where $newrev would be "M" and $baserev would be "B". This list
includes all the "2" revisions as well as all the "1" revisions.
This patch addresses this problem by using
git-rev-parse --not --all | git-rev-list --stdin $newrev ^$baserev
To inhibit the display of all revisions that are already in the
repository.
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
templates/hooks--update | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/templates/hooks--update b/templates/hooks--update
index e8c536f..7e8258a 100644
--- a/templates/hooks--update
+++ b/templates/hooks--update
@@ -190,7 +190,7 @@ case "$refname_type" in
fi
echo ""
echo $LOGBEGIN
- git-rev-list --pretty $newrev ^$baserev
+ git-rev-parse --not --all | git-rev-list --stdin --pretty $newrev ^$baserev
echo $LOGEND
echo ""
echo "Diffstat:"
--
1.5.0.rc4.364.g85b1
next reply other threads:[~2007-02-13 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-13 14:24 Andy Parkins [this message]
2007-02-13 17:41 ` [PATCH 2/3] Only show log entries for new revisions in hooks--update Junio C Hamano
2007-02-13 18:08 ` Andy Parkins
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=200702131424.06983.andyparkins@gmail.com \
--to=andyparkins@gmail.com \
--cc=git@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).