{"thread":{"id":"37151","subject":"[PATCH] hooks/post-receive-email: do not truncate messages at a '.' line","startedAt":"2014-07-17T19:26:29Z","lastAt":"2014-07-17T19:36:13Z","messageCount":2,"participants":["Kyle J. McKay","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"246265","messageId":"53b2ad7801889b49f04cb0ae7b0b37b@74d39fa044aa309eaea14b9f57fe79c","threadId":"37151","inReplyTo":null,"subject":"[PATCH] hooks/post-receive-email: do not truncate messages at a '.' line","fromName":"Kyle J. McKay","fromEmail":"mackyle@gmail.com","sentAt":"2014-07-17T19:26:29Z","receivedAt":"2014-07-17T19:26:29Z","isPatch":true,"sender":{"key":"mackyle@gmail.com","avatar":"https://avatars.githubusercontent.com/u/813346?v=4"},"body":"When sendmail is reading an incoming message, by default it will\nterminate it if it reads a dot on a line by itself.\n\nThe post-receive-email script can generate such a line if the\nmessage in a tag object contains a dot ('.') on a line by itself.\n\nThere are two options to turn off this behavior, -i and -oi which\nare equivalent.\n\nThe choice of which to use is based on the observation that -i\nappears to be the more commonly used option for this and that all\ncurrent sendmail-compatible programs appear to accept both.\n\nTherefore add the -i option to the invocations of /usr/sbin/sendmail\nto avoid prematurely terminating the input message at the occurence\nof a dot ('.') on a line by itself.\n\nSigned-off-by: Kyle J. McKay <mackyle@gmail.com>\n---\n\nBTW, what is the status of post-receive-email?\n\nI find it quite useful for a minimal server that only needs Git\nbinaries and a POSIX shell.\n\nThe only real issue with it I'm aware of is that if multiple\nbranch heads are updated in a single push and two or more\ncontain the same new revison(s), those revision(s) will be\nincorrectly omitted from the emails sent out.\n\nI have a patch to correct that, but it's not quite as simple\nas this patch and would need more review, so I don't really\nwant to send it out and waste folks' time if there's no interest\nin picking up updates to contrib/hooks/post-receive-email.\n\n contrib/hooks/post-receive-email | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email\nindex 8747b843..6207be60 100755\n--- a/contrib/hooks/post-receive-email\n+++ b/contrib/hooks/post-receive-email\n@@ -704,9 +704,9 @@ limit_lines()\n send_mail()\n {\n \tif [ -n \"$envelopesender\" ]; then\n-\t\t/usr/sbin/sendmail -t -f \"$envelopesender\"\n+\t\t/usr/sbin/sendmail -i -t -f \"$envelopesender\"\n \telse\n-\t\t/usr/sbin/sendmail -t\n+\t\t/usr/sbin/sendmail -i -t\n \tfi\n }\n \n-- \n1.8.5\n"},{"id":"246266","messageId":"xmqq38dzpykx.fsf@gitster.dls.corp.google.com","threadId":"37151","inReplyTo":"53b2ad7801889b49f04cb0ae7b0b37b@74d39fa044aa309eaea14b9f57fe79c","subject":"Re: [PATCH] hooks/post-receive-email: do not truncate messages at a '.' line","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2014-07-17T19:36:13Z","receivedAt":"2014-07-17T19:36:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Kyle J. McKay\" <mackyle@gmail.com> writes:\n\n> There are two options to turn off this behavior, -i and -oi which\n> are equivalent.\n>\n> The choice of which to use is based on the observation that -i\n> appears to be the more commonly used option for this and that all\n> current sendmail-compatible programs appear to accept both.\n\nOK; I suspect some just accept but ignore, though.\n\n> BTW, what is the status of post-receive-email?\n\nI do not use either, but some people seem to consider multimail its\nsuccessor, so enhancements may have a wider audience there.\n"}]}