Skip to content

Commit

Permalink
fix contrib/hooks/post-receive-email hooks.recipients error message
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Muizelaar authored and Shawn O. Pearce committed Oct 16, 2007
1 parent 0c696fe commit fdfeb87
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion contrib/hooks/post-receive-email
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,15 @@ generate_email()

# Check if we've got anyone to send to
if [ -z "$recipients" ]; then
echo >&2 "*** hooks.recipients is not set so no email will be sent"
case "$refname_type" in
"annotated tag")
config_name="hooks.announcelist"
;;
*)
config_name="hooks.mailinglist"
;;
esac
echo >&2 "*** $config_name is not set so no email will be sent"
echo >&2 "*** for $refname update $oldrev->$newrev"
exit 0
fi
Expand Down

0 comments on commit fdfeb87

Please sign in to comment.