git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] fix contrib/hooks/post-receive-email hooks.recipients error message

From
Jeff Muizelaar <jeff@infidigm.net>
Date
Oct 11, 2007, 21:49 UTC
Message-ID
<20071011214921.GA11852@infidigm.net>

Have the error message for missing recipients actually report the missing config variable and not a fictional one.

diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index cbbd02f..b188aa3 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
Message 1 of 1 in “fix contrib/hooks/post-receive-email hooks.recipients error message”
  1. fix contrib/hooks/post-receive-email hooks.recipients error messageJeff Muizelaar, Oct 11, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.