{"thread":{"id":"10253","subject":"[PATCH] fix contrib/hooks/post-receive-email hooks.recipients error message","startedAt":"2007-10-11T21:49:21Z","lastAt":"2007-10-11T21:49:21Z","messageCount":1,"participants":["Jeff Muizelaar"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"55516","messageId":"20071011214921.GA11852@infidigm.net","threadId":"10253","inReplyTo":null,"subject":"[PATCH] fix contrib/hooks/post-receive-email hooks.recipients error message","fromName":"Jeff Muizelaar","fromEmail":"jeff@infidigm.net","sentAt":"2007-10-11T21:49:21Z","receivedAt":"2007-10-11T21:49:21Z","isPatch":true,"sender":{"key":"jmuizelaar@mozilla.com","avatar":"https://avatars.githubusercontent.com/u/332653?v=4"},"body":"Have the error message for missing recipients actually report the\nmissing config variable and not a fictional one.\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex cbbd02f..b188aa3 100644\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -138,7 +138,15 @@ generate_email()\n \n \t# Check if we've got anyone to send to\n \tif [ -z \"$recipients\" ]; then\n-\t\techo >&2 \"*** hooks.recipients is not set so no email will be sent\"\n+\t\tcase \"$refname_type\" in\n+\t\t\t\"annotated tag\")\n+\t\t\t\tconfig_name=\"hooks.announcelist\"\n+\t\t\t\t;;\n+\t\t\t*)\n+\t\t\t\tconfig_name=\"hooks.mailinglist\"\n+\t\t\t\t;;\n+\t\tesac\n+\t\techo >&2 \"*** $config_name is not set so no email will be sent\"\n \t\techo >&2 \"*** for $refname update $oldrev->$newrev\"\n \t\texit 0\n \tfi\n"}]}