summaryrefslogtreecommitdiff
path: root/contrib/hooks
diff options
context:
space:
mode:
authorLibravatar Jeff Muizelaar <jeff@infidigm.net>2007-10-11 17:49:21 -0400
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-10-15 21:26:42 -0400
commitfdfeb87c14e36d4c49b4481d01cd8bc103ba95f1 (patch)
tree628f2aa7dc0ea69bfca1260233fa712d2b6be405 /contrib/hooks
parentSupport cvs via git-shell (diff)
downloadtgif-fdfeb87c14e36d4c49b4481d01cd8bc103ba95f1.tar.xz
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>
Diffstat (limited to 'contrib/hooks')
-rw-r--r--contrib/hooks/post-receive-email10
1 files changed, 9 insertions, 1 deletions
diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index cbbd02fadd..b188aa3d67 100644
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -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