Skip to content

Commit cc24a1d

Browse files
jrngitster
authored andcommitted
post-receive-email: document command-line mode
According to the default hooks/post-receive file, the hook is called with three arguments on stdin: <oldrev> <newrev> <refname> 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 <[email protected]> Cc: Andy Parkins <[email protected]> Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d07ef71 commit cc24a1d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

contrib/hooks/post-receive-email

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
# possible for the email to be from someone other than the person doing the
2424
# push.
2525
#
26+
# To help with debugging and use on pre-v1.5.1 git servers, this script will
27+
# also obey the interface of hooks/update, taking its arguments on the
28+
# command line. Unfortunately, hooks/update is called once for each ref.
29+
# To avoid firing one email per ref, this script just prints its output to
30+
# the screen when used in this mode. The output can then be redirected if
31+
# wanted.
32+
#
2633
# Config
2734
# ------
2835
# hooks.mailinglist

0 commit comments

Comments
 (0)