public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
* [PATCH] hooks/post-receive-email: do not truncate messages at a '.' line
@ 2014-07-17 19:26 Kyle J. McKay
  2014-07-17 19:36 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Kyle J. McKay @ 2014-07-17 19:26 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

When sendmail is reading an incoming message, by default it will
terminate it if it reads a dot on a line by itself.

The post-receive-email script can generate such a line if the
message in a tag object contains a dot ('.') on a line by itself.

There are two options to turn off this behavior, -i and -oi which
are equivalent.

The choice of which to use is based on the observation that -i
appears to be the more commonly used option for this and that all
current sendmail-compatible programs appear to accept both.

Therefore add the -i option to the invocations of /usr/sbin/sendmail
to avoid prematurely terminating the input message at the occurence
of a dot ('.') on a line by itself.

Signed-off-by: Kyle J. McKay <mackyle@gmail•com>
---

BTW, what is the status of post-receive-email?

I find it quite useful for a minimal server that only needs Git
binaries and a POSIX shell.

The only real issue with it I'm aware of is that if multiple
branch heads are updated in a single push and two or more
contain the same new revison(s), those revision(s) will be
incorrectly omitted from the emails sent out.

I have a patch to correct that, but it's not quite as simple
as this patch and would need more review, so I don't really
want to send it out and waste folks' time if there's no interest
in picking up updates to contrib/hooks/post-receive-email.

 contrib/hooks/post-receive-email | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index 8747b843..6207be60 100755
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -704,9 +704,9 @@ limit_lines()
 send_mail()
 {
 	if [ -n "$envelopesender" ]; then
-		/usr/sbin/sendmail -t -f "$envelopesender"
+		/usr/sbin/sendmail -i -t -f "$envelopesender"
 	else
-		/usr/sbin/sendmail -t
+		/usr/sbin/sendmail -i -t
 	fi
 }
 
-- 
1.8.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hooks/post-receive-email: do not truncate messages at a '.' line
  2014-07-17 19:26 [PATCH] hooks/post-receive-email: do not truncate messages at a '.' line Kyle J. McKay
@ 2014-07-17 19:36 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2014-07-17 19:36 UTC (permalink / raw)
  To: Kyle J. McKay; +Cc: git, Michael Haggerty

"Kyle J. McKay" <mackyle@gmail•com> writes:

> There are two options to turn off this behavior, -i and -oi which
> are equivalent.
>
> The choice of which to use is based on the observation that -i
> appears to be the more commonly used option for this and that all
> current sendmail-compatible programs appear to accept both.

OK; I suspect some just accept but ignore, though.

> BTW, what is the status of post-receive-email?

I do not use either, but some people seem to consider multimail its
successor, so enhancements may have a wider audience there.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-17 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-17 19:26 [PATCH] hooks/post-receive-email: do not truncate messages at a '.' line Kyle J. McKay
2014-07-17 19:36 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox