From: Andy Parkins <andyparkins@gmail.com>
To: git@vger.kernel.org
Subject: [PATCH 2/4] update-hook: show the contents of the tag message for annotated tags
Date: Tue, 20 Mar 2007 10:58:38 +0000 [thread overview]
Message-ID: <200703201058.38519.andyparkins@gmail.com> (raw)
The annotated tag points at a commit, for which we show the short log.
However, the tag itself contains a message, possibly release notes or
hand-written change log - whatever it contains is worth showing. The
tag message is extracted with
git cat-file tag $newrev | tail -q -n +5
Which is dangerously reliant on the format of the tag object being four
header lines then the message. I don't like it, but I don't know of any
other way of extracting the message. It's also missing any kind of
support for the GPG signature.
Signed-off-by: Andy Parkins <andyparkins@gmail.com>
---
templates/hooks--update | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/templates/hooks--update b/templates/hooks--update
index 1a60773..31e72ca 100644
--- a/templates/hooks--update
+++ b/templates/hooks--update
@@ -231,8 +231,14 @@ case "$refname_type" in
echo ""
echo $LOGBEGIN
- echo ""
+ # Show the content of the tag message; this might contain a change log
+ # or release notes so is worth displaying. "tail -n +5" is there to
+ # remove the first 4 lines of the tag object, those details have
+ # already been summarised above
+ git cat-file tag $newrev | tail -q -n +5
+
+ echo ""
if [ -n "$prevtag" ]; then
git rev-list --pretty=short "$prevtag..$newrev" | git shortlog
else
--
1.5.0.3.402.g0c48
next reply other threads:[~2007-03-20 10:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-20 10:58 Andy Parkins [this message]
2007-03-20 12:41 ` [PATCH 2/4] update-hook: show the contents of the tag message for annotated tags Martin Waitz
2007-03-20 15:27 ` Andy Parkins
2007-03-20 15:36 ` Shawn O. Pearce
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=200703201058.38519.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.