Skip to content

Commit 5ffd311

Browse files
meyeringgitster
authored andcommitted
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 <[email protected]>
1 parent b74d779 commit 5ffd311

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/hooks/post-receive-email

100644100755
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444
# --pretty %s", displaying the commit id, author, date and log
4545
# message. To list full patches separated by a blank line, you
4646
# could set this to "git show -C %s; echo".
47+
# To list a gitweb/cgit URL *and* a full patch for each change set, use this:
48+
# "t=%s; printf 'http://.../?id=%%s' \$t; echo;echo; git show -C \$t; echo"
49+
# Be careful if "..." contains things that will be expanded by shell "eval"
50+
# or printf.
4751
#
4852
# Notes
4953
# -----

0 commit comments

Comments
 (0)