{"thread":{"id":"19449","subject":"[PATCH] post-receive-email: hooks.showrev: show how to include both web link and patch","startedAt":"2009-05-23T12:26:44Z","lastAt":"2009-05-23T12:26:44Z","messageCount":1,"participants":["Jim Meyering"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"114512","messageId":"87fxewc8e3.fsf@meyering.net","threadId":"19449","inReplyTo":null,"subject":"[PATCH] post-receive-email: hooks.showrev: show how to include both web link and patch","fromName":"Jim Meyering","fromEmail":"jim@meyering.net","sentAt":"2009-05-23T12:26:44Z","receivedAt":"2009-05-23T12:26:44Z","isPatch":true,"sender":{"key":"jim@meyering.net","avatar":"https://avatars.githubusercontent.com/u/710630?v=4"},"body":"\nAdd a comment showing how to include a web link (i.e. gitweb/cgit)\nand a patch in the email that is sent for each pushed commit.\n---\nThe quoting was tricky enough that it's worth documenting.\nAt first I wanted to put \\n\\n in the printf, but to do\nso would have meant using \\\\\\\\n\\\\\\\\n, and in the end,\nthe pair of \"echo\" statements seemed better.\n\nFYI, I did this for glibc.git:\n  http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=summary\n\npush-triggered messages have been sent to this list since May 21:\n  http://sourceware.org/ml/glibc-cvs/2009-q2/\n\n contrib/hooks/post-receive-email |    4 ++++\n 1 files changed, 4 insertions(+), 0 deletions(-)\n mode change 100644 => 100755 contrib/hooks/post-receive-email\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nold mode 100644\nnew mode 100755\nindex 60cbab6..2a66063\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -44,6 +44,10 @@\n #   --pretty %s\", displaying the commit id, author, date and log\n #   message.  To list full patches separated by a blank line, you\n #   could set this to \"git show -C %s; echo\".\n+#   To list a gitweb/cgit URL *and* a full patch for each change set, use this:\n+#     \"t=%s; printf 'http://.../?id=%%s' \\$t; echo;echo; git show -C \\$t; echo\"\n+#   Be careful if \"...\" contains things that will be expanded by shell \"eval\"\n+#   or printf.\n #\n # Notes\n # -----\n--\n1.6.3.1.208.gf0011\n"}]}