From: Jeff Muizelaar Date: Thu, 11 Oct 2007 21:49:21 +0000 (-0400) Subject: fix contrib/hooks/post-receive-email hooks.recipients error message X-Git-Tag: v1.5.4-rc0~377 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fdfeb87c14e36d4c49b4481d01cd8bc103ba95f1;p=git.git 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 Signed-off-by: Shawn O. Pearce --- diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email index cbbd02fad..b188aa3d6 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