Skip to content

Commit fdfeb87

Browse files
Jeff Muizelaarspearce
authored andcommitted
fix contrib/hooks/post-receive-email hooks.recipients error message
Have the error message for missing recipients actually report the missing config variable and not a fictional one. Signed-off-by: Lars Hjemli <hjemli@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
1 parent 0c696fe commit fdfeb87

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

contrib/hooks/post-receive-email

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,15 @@ generate_email()
138138

139139
# Check if we've got anyone to send to
140140
if [ -z "$recipients" ]; then
141-
echo >&2 "*** hooks.recipients is not set so no email will be sent"
141+
case "$refname_type" in
142+
"annotated tag")
143+
config_name="hooks.announcelist"
144+
;;
145+
*)
146+
config_name="hooks.mailinglist"
147+
;;
148+
esac
149+
echo >&2 "*** $config_name is not set so no email will be sent"
142150
echo >&2 "*** for $refname update $oldrev->$newrev"
143151
exit 0
144152
fi

0 commit comments

Comments
 (0)