quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] [PATCH] quilt/mail: Fix threading of patch messages


From: Andreas Grünbacher
Subject: Re: [Quilt-dev] [PATCH] quilt/mail: Fix threading of patch messages
Date: Wed, 9 Dec 2015 14:48:32 +0100

Peter,

2015-12-08 18:12 GMT+01:00 Peter Oberparleiter <address@hidden>:
> Starting with commit 1d659beb ("quilt/mail: Remove procmail dependency")
> patch messages no longer refer to the introduction message via the
> References header. Also --reply-to no longer adds an In-Reply-To header.
>
> The reason for this behavior is that the sed script used to extract
> message header values matches field names in a case sensitive manner.
> At the same time the quilt/mail script mixes case when generating and
> scanning for the Message-ID header field. As a result the Message IDs of
> the introduction message and of messages which are replied to are not
> recognized.
>
> Fix this by changing the sed script to match field names in a case
> insensitive manner.
>
> Signed-off-by: Peter Oberparleiter <address@hidden>
> --- a/quilt/mail.in
> +++ b/quilt/mail.in
> @@ -90,7 +90,7 @@ extract_header_value()
>
>        # Long Header Fields may span multiple lines, in which case CRLF
>        # is followed by space or tab (RFC 2822)
> -      sed -n "/^${header}/,/^[^[:blank:]]/ { /^${header}/ { s/^${header}//p; 
> n; }; /^[^[:blank:]]/q; /^$/q; p; }"
> +      sed -n "/^${header}/I,/^[^[:blank:]]/ { /^${header}/I { 
> s/^${header}//Ip; n; }; /^[^[:blank:]]/q; /^$/q; p; }"

this change seems to make sense, but I would like the sed expression
to be replaced with something less messy, like:

extract_header_value() {
        local header=$1

        # Long Header Fields may span multiple lines, in which case CRLF
        # is followed by space or tab (RFC 2822)
        sed -n -e "/^${header}/I { s/^${header}//I; : _; p; n;
/^[[:blank:]]/!b; b _ }"
}

(Here, ": _" defines a label and "b _" unconditionally jumps there.)

Does that look okay?

Thanks,
Andreas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]