[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] [PATCH] quilt mail: Handle line breaks in subject
From: |
Andreas Gruenbacher |
Subject: |
Re: [Quilt-dev] [PATCH] quilt mail: Handle line breaks in subject |
Date: |
Tue, 11 Oct 2011 04:32:22 +0200 |
On Mon, 2011-10-10 at 15:00 -0400, Steven Rostedt wrote:
> I just finished the below patch and noticed that you already did it :-p
Oops, sorry ... either fix should do; I'll count this as a review,
thanks :)
> Side note, I have my own patch that I add every time I update quilt to
> add a bunch of *-by: tags to email. Because I sometimes have
> "Suggested-by" or "Reported-by", etc. And I feel they should also be
> Cc'd on the patch.
I don't see a problem with this in principle, but the patch ignores
Greg's comma fix (commit f3e78220). So this should better be something
like:
diff --git a/quilt/mail.in b/quilt/mail.in
index 5752542..de23878 100644
--- a/quilt/mail.in
+++ b/quilt/mail.in
@@ -370,10 +370,14 @@ then
# addresses that contain commas and add quotes, e.g.,
# Last, First <email> => "Last, First" <email>
+ set -- Signed-off-by Acked-by Suggested-by Reviewed-by
Requested-by Reported-by Tested-by
+ set -- "$*"
+ set -- ${*// /\\|}
+
sed -n -e "/\<${LOGNAME:-$(whoami)}@/d" \
-e 's/^\(To\|Cc\):/Recipient-\1:/ip' \
- -e 's/^\(\(Signed-off-by\|Acked-by\):[
'$'\t'']*\)\([^"]*\(,[^"]*\)\+[^" '$'\t'']\)\([ '$'\t'']*<.*>\)/\1"\3"\5/i' \
- -e 's/^\(Signed-off-by\|Acked-by\):/Recipient-Cc:/ip' \
+ -e 's/^\(\('"$*"'\):[ '$'\t'']*\)\([^"]*\(,[^"]*\)\+[^"
'$'\t'']\)\([ '$'\t'']*<.*>\)/\1"\3"\5/i' \
+ -e 's/^\('"$*"'\):/Recipient-Cc:/ip' \
$tmpdir/header
echo
Andreas