path: root/contrib/hooks
diff options
authorJim Meyering <>2009-05-23 12:26:44 (GMT)
committerJunio C Hamano <>2009-05-23 17:29:22 (GMT)
commit5ffd3113d4109ae5d3595425af3ff4a781617631 (patch)
tree528b46a692ff9fdf5421fcaee3ff612f0da75d1c /contrib/hooks
parentb74d779bd90477f6514d0a9be4a75b4c40ed946c (diff)
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:;a=summary push-triggered messages have been sent to this list since May 21: Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'contrib/hooks')
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 60cbab6..2a66063 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
# -----