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>
Jeff Muizelaar committed
Oct 11, 2007 at 17:49 UTC
fdfeb87c14e36d4c49b4481d01cd8bc103ba95f1
1 file changed
+9
-1
contrib/hooks/post-receive-email
+9
-1
@@ -138,7 +138,15 @@ generate_email()
138
139
# Check if we've got anyone to send to
140
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"
150
echo >&2 "*** for $refname update $oldrev->$newrev"
151
exit 0
152
fi