From: Jim Meyering <jim@meyering•net>
To: git list <git@vger•kernel.org>
Subject: [PATCH] post-receive-email: hooks.showrev: show how to include both web link and patch
Date: Sat, 23 May 2009 14:26:44 +0200 [thread overview]
Message-ID: <87fxewc8e3.fsf@meyering.net> (raw)
Add a comment showing how to include a web link (i.e. gitweb/cgit)
and a patch in the email that is sent for each pushed commit.
---
The quoting was tricky enough that it's worth documenting.
At first I wanted to put \n\n in the printf, but to do
so would have meant using \\\\n\\\\n, and in the end,
the pair of "echo" statements seemed better.
FYI, I did this for glibc.git:
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=summary
push-triggered messages have been sent to this list since May 21:
http://sourceware.org/ml/glibc-cvs/2009-q2/
contrib/hooks/post-receive-email | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
mode change 100644 => 100755 contrib/hooks/post-receive-email
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
old mode 100644
new mode 100755
index 60cbab6..2a66063
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -44,6 +44,10 @@
# --pretty %s", displaying the commit id, author, date and log
# message. To list full patches separated by a blank line, you
# could set this to "git show -C %s; echo".
+# To list a gitweb/cgit URL *and* a full patch for each change set, use this:
+# "t=%s; printf 'http://.../?id=%%s' \$t; echo;echo; git show -C \$t; echo"
+# Be careful if "..." contains things that will be expanded by shell "eval"
+# or printf.
#
# Notes
# -----
--
1.6.3.1.208.gf0011
reply other threads:[~2009-05-23 12:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87fxewc8e3.fsf@meyering.net \
--to=jim@meyering$(echo .)net \
--cc=git@vger$(echo .)kernel.org \
/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