{"thread":{"id":"23819","subject":"Bug#428413: commit mail sender messes up order of arguments","startedAt":"2010-05-16T01:26:15Z","lastAt":"2010-05-16T01:26:15Z","messageCount":1,"participants":["Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"141754","messageId":"20100516012615.GA5599@progeny.tock","threadId":"23819","inReplyTo":"20070611150405.GA4211@lapse.madduck.net","subject":"Bug#428413: commit mail sender messes up order of arguments","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-05-16T01:26:15Z","receivedAt":"2010-05-16T01:26:15Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"tags 428413 - wontfix\nreassign 428413 git git-core/1:1.5.2.1-1\nfound 428413 git/1:1.7.1-1\nquit\n\nmartin f krafft wrote:\n\n> According to the default hooks/post-receive file, the hook is called\n> with three arguments on stdin:\n> \n>   <oldrev> <newrev> <refname>\n> \n> This leads people to assume that in command-line mode, the order\n> should be the same. But it's not, because the email hook instead\n> calls:\n> \n>   generate_email $2 $3 $1\n> \n> this is at least misleading and not documented anywhere.\n\nSo maybe we should document it.\n\nI haven’t checked that the below is actually true; I just took the\ncommit message to v1.5.1~9 and paraphrased it.  Thoughts?\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n contrib/hooks/post-receive-email |    7 +++++++\n 1 files changed, 7 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex 58a35c8..30ae63d 100755\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -23,6 +23,13 @@\n # possible for the email to be from someone other than the person doing the\n # push.\n #\n+# To help with debugging and use on pre-v1.5.1 git servers, this script will\n+# also obey the interface of hooks/update, taking its arguments on the\n+# command line.  Unfortunately, hooks/update is called once for each ref.\n+# To avoid firing one email per ref, this script just prints its output to\n+# the screen when used in this mode.  The output can then be redirected if\n+# wanted.\n+#\n # Config\n # ------\n # hooks.mailinglist\n-- \n1.7.1\n\n\n\n\n-- \nTo UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org\nwith a subject of \"unsubscribe\". Trouble? Contact listmaster@lists.debian.org\n"}]}