git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Correction for post-receive-email
@ 2007-10-05  7:14 Eric Mertens
  2007-10-05  8:13 ` Andy Parkins
  0 siblings, 1 reply; 5+ messages in thread
From: Eric Mertens @ 2007-10-05  7:14 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 409 bytes --]

Hello,

(My apologies if my incorrectly addressed subscribe message went to the list)

I noticed that my mutt wasn't correctly detecting the signature block
on the end of the automated emails I was receiving from the script in
contrib. I've made this trivial change in my local copy of the script,
but I figured that if I was going to be modifying the source code I
should share my changes.

-- 
Eric Mertens

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Correct-signature-block-delimiter-in-post-receive-em.patch --]
[-- Type: text/x-patch; name="0001-Correct-signature-block-delimiter-in-post-receive-em.patch", Size: 792 bytes --]

From 119f84fa6f6bb33c6fc524ab4277d38bebc10468 Mon Sep 17 00:00:00 2001
From: Eric Mertens <emertens@gmail.com>
Date: Fri, 5 Oct 2007 00:06:52 -0700
Subject: [PATCH] Correct signature block delimiter in post-receive-email by adding a trailing space

This change allows mail clients like Mutt to easily detect the signature
and is consistent with the signature block article on Wikipedia.
---
 contrib/hooks/post-receive-email |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/hooks/post-receive-email b/contrib/hooks/post-receive-email
index cbbd02f..828651a 100644
--- a/contrib/hooks/post-receive-email
+++ b/contrib/hooks/post-receive-email
@@ -198,7 +198,7 @@ generate_email_footer()
 
 
 	hooks/post-receive
-	--
+	-- 
 	$projectdesc
 	EOF
 }
-- 
1.5.3.4


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

* Re: Correction for post-receive-email
  2007-10-05  7:14 Correction for post-receive-email Eric Mertens
@ 2007-10-05  8:13 ` Andy Parkins
  2007-10-05  8:54   ` Andreas Ericsson
  2007-10-05 12:35   ` Bill Lear
  0 siblings, 2 replies; 5+ messages in thread
From: Andy Parkins @ 2007-10-05  8:13 UTC (permalink / raw)
  To: git; +Cc: Eric Mertens

On Friday 2007 October 05, Eric Mertens wrote:

> I noticed that my mutt wasn't correctly detecting the signature block
> on the end of the automated emails I was receiving from the script in
> contrib. I've made this trivial change in my local copy of the script,
> but I figured that if I was going to be modifying the source code I
> should share my changes.

That change has been in my pending queue for a while.  It's technically 
correct, but I've never submitted it.  The reason I haven't is that it adds 
trailing whitespace.

Perhaps one of the shell gurus can offer a nicer way of having a trailing 
space be output in a heredoc that doesn't add a trailing space in the source 
script?


Andy

-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

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

* Re: Correction for post-receive-email
  2007-10-05  8:13 ` Andy Parkins
@ 2007-10-05  8:54   ` Andreas Ericsson
  2007-10-05 12:35   ` Bill Lear
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Ericsson @ 2007-10-05  8:54 UTC (permalink / raw)
  To: Andy Parkins; +Cc: git, Eric Mertens

Andy Parkins wrote:
> On Friday 2007 October 05, Eric Mertens wrote:
> 
>> I noticed that my mutt wasn't correctly detecting the signature block
>> on the end of the automated emails I was receiving from the script in
>> contrib. I've made this trivial change in my local copy of the script,
>> but I figured that if I was going to be modifying the source code I
>> should share my changes.
> 
> That change has been in my pending queue for a while.  It's technically 
> correct, but I've never submitted it.  The reason I haven't is that it adds 
> trailing whitespace.
> 
> Perhaps one of the shell gurus can offer a nicer way of having a trailing 
> space be output in a heredoc that doesn't add a trailing space in the source 
> script?
> 

space=' '

cat << EOF
--$space
EOF

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

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

* Re: Correction for post-receive-email
  2007-10-05  8:13 ` Andy Parkins
  2007-10-05  8:54   ` Andreas Ericsson
@ 2007-10-05 12:35   ` Bill Lear
  2007-10-05 14:29     ` Andy Parkins
  1 sibling, 1 reply; 5+ messages in thread
From: Bill Lear @ 2007-10-05 12:35 UTC (permalink / raw)
  To: Andy Parkins; +Cc: git, Eric Mertens

On Friday, October 5, 2007 at 09:13:57 (+0100) Andy Parkins writes:
>On Friday 2007 October 05, Eric Mertens wrote:
>
>> I noticed that my mutt wasn't correctly detecting the signature block
>> on the end of the automated emails I was receiving from the script in
>> contrib. I've made this trivial change in my local copy of the script,
>> but I figured that if I was going to be modifying the source code I
>> should share my changes.
>
>That change has been in my pending queue for a while.  It's technically 
>correct, but I've never submitted it.  The reason I haven't is that it adds 
>trailing whitespace.
>
>Perhaps one of the shell gurus can offer a nicer way of having a trailing 
>space be output in a heredoc that doesn't add a trailing space in the source 
>script?

I have a few changes I would like to see in this script, ones that I think
would make it generally more useful.  I don't have a clean patch, though,
so should I just submit suggestions to you directly, Andy?


Bill

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

* Re: Correction for post-receive-email
  2007-10-05 12:35   ` Bill Lear
@ 2007-10-05 14:29     ` Andy Parkins
  0 siblings, 0 replies; 5+ messages in thread
From: Andy Parkins @ 2007-10-05 14:29 UTC (permalink / raw)
  To: git; +Cc: Bill Lear, Eric Mertens

On Friday 2007 October 05, Bill Lear wrote:

> I have a few changes I would like to see in this script, ones that I think
> would make it generally more useful.  I don't have a clean patch, though,
> so should I just submit suggestions to you directly, Andy?

Me; or the list. Or both.

I'm happy to try to accommodate any suggestions.  I'm happy if it is useful to 
anyone other than just me :-)


--- SNIP THIS BIT IF YOU'RE NOT INTERESTED IN ITS BUGS ---
The big fault in it as it stands is that it doesn't try to reorder the refs 
being updated to the most logical form.  For example:

 O --- * --- A (ref2)
              \
               B (ref1)

Let's say that both ref1 and ref2 were originally at O and this push has moved 
them to these new locations.  The email hook gets sent this information like 
this:

 refs/heads/ref1 O B
 refs/heads/ref2 O A

The hook iterates through this list, for each ref update it shows only the 
commits introduced by the change that aren't already included in an existing 
ref.  This is the problem, ref2 introduced "*" and "A" and ref1 
introduced "B",  ideally then the two emails would show

 ref2 updated from O to A
   new revs: *, A
 ref1 updated from O to B
   new revs: B

But because ref1 is alphabetically before ref1, what you get is:

 ref1 updated from O to B
   new revs: *, A, B
 ref2 updated from O to A
   new revs: <none>

I can't say I know what the answer is; nor even what the correct output should 
be.  If anyone has opinions on this, I'll be glad to hear them.


Andy
-- 
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com

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

end of thread, other threads:[~2007-10-05 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-05  7:14 Correction for post-receive-email Eric Mertens
2007-10-05  8:13 ` Andy Parkins
2007-10-05  8:54   ` Andreas Ericsson
2007-10-05 12:35   ` Bill Lear
2007-10-05 14:29     ` Andy Parkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).