summaryrefslogtreecommitdiff
path: root/contrib/hooks/post-receive-email
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2009-05-23 14:26:44 +0200
committerJunio C Hamano <gitster@pobox.com>2009-05-23 10:29:22 -0700
commit5ffd3113d4109ae5d3595425af3ff4a781617631 (patch)
tree528b46a692ff9fdf5421fcaee3ff612f0da75d1c /contrib/hooks/post-receive-email
parentb74d779bd90477f6514d0a9be4a75b4c40ed946c (diff)
downloadgit-5ffd3113d4109ae5d3595425af3ff4a781617631.tar.gz
post-receive-email: hooks.showrev: show how to include both web link and patch
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. To add two blank lines (i.e. put \n\n in the printf), you would need to say \\\\n\\\\n, and in the end, the pair of "echo" statements seemed better. This is used in glibc.git repository: 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/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/hooks/post-receive-email')
-rwxr-xr-x[-rw-r--r--]contrib/hooks/post-receive-email4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 60cbab65d3..2a66063e44 100644..100755
--- 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
# -----