From: Jonathan Nieder Date: Wed, 19 May 2010 19:01:47 +0000 (-0500) Subject: post-receive-email: document command-line mode X-Git-Tag: v1.7.2-rc0~3^2~21 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cc24a1d809c75f0b6e5b1e56134b5127196bb2fb;p=git.git post-receive-email: document command-line mode According to the default hooks/post-receive file, the hook is called with three arguments on stdin: In command-line mode, the arguments come in a different order, because the email hook instead calls: generate_email $2 $3 $1 Add a comment to explain why, based on comments from the mailing list and the commit message to v1.5.1~9. Thanks to Andy for the explanation. Requested-by: martin f. krafft Cc: Andy Parkins Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email index 58a35c828..30ae63d74 100755 --- a/contrib/hooks/post-receive-email +++ b/contrib/hooks/post-receive-email @@ -23,6 +23,13 @@ # possible for the email to be from someone other than the person doing the # push. # +# To help with debugging and use on pre-v1.5.1 git servers, this script will +# also obey the interface of hooks/update, taking its arguments on the +# command line. Unfortunately, hooks/update is called once for each ref. +# To avoid firing one email per ref, this script just prints its output to +# the screen when used in this mode. The output can then be redirected if +# wanted. +# # Config # ------ # hooks.mailinglist