Skip to content

Commit

Permalink
post-receive-email: hooks.showrev: show how to include both web link …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Jim Meyering authored and Junio C Hamano committed May 23, 2009
1 parent b74d779 commit 5ffd311
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/hooks/post-receive-email
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
# -----
Expand Down

0 comments on commit 5ffd311

Please sign in to comment.