From: Kirill Smelkov <kirr@landau.phys.spbu.ru>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [BUG PATCH RFC] mailinfo: correctly handle multiline 'Subject:' header
Date: Thu, 8 Jan 2009 01:43:42 +0300 [thread overview]
Message-ID: <20090107224342.GB4946@roro3> (raw)
In-Reply-To: <1230316721-14339-1-git-send-email-kirr@mns.spb.ru>
On Fri, Dec 26, 2008 at 09:38:41PM +0300, Kirill Smelkov wrote:
> When native language (RU) is in use, subject header usually contains several
> parts, e.g.
>
> Subject: [Navy-patches] [PATCH]
> =?utf-8?b?0JjQt9C80LXQvdGR0L0g0YHQv9C40YHQvtC6INC/0LA=?=
> =?utf-8?b?0LrQtdGC0L7QsiDQvdC10L7QsdGF0L7QtNC40LzRi9GFINC00LvRjyA=?=
> =?utf-8?b?0YHQsdC+0YDQutC4?=
Which btw should be extracted by git-mailinfo to:
'Subject: Изменён список пакетов необходимых для сборки'
> This exposes several bugs in builtin-mailinfo.c that I try to fix:
>
>
> 1. decode_b_segment: do not append explicit NUL -- explicit NUL was preventing
> correct header construction on parts concatenation via strbuf_addbuf in
> decode_header_bq. Fixes:
>
> -Subject: Изменён список пакетов необходимых для сборки
> +Subject: Изменён список па
>
>
> Then
>
> 2. (hackish) do not emit '\n' after processing of every header segment. It
> seems we should emit previous part as-is only if it does not end with
> '=?='. Fixes:
>
> -Subject: Изменён список пакетов необходимых для сборки
> +Subject: Изменён список па кетов необходимых для сборки
>
>
> Sorry for low-quality patch and description. I did what I could and don't have
> energy and time dig more into MIME.
>
> Please help.
>
> Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
>
> ---
> builtin-mailinfo.c | 18 ++++++++++++++++-
> t/t5100-mailinfo.sh | 2 +-
> t/t5100/info0012 | 5 ++++
> t/t5100/msg0012 | 7 ++++++
> t/t5100/patch0012 | 30 +++++++++++++++++++++++++++++
> t/t5100/sample.mbox | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 6 files changed, 112 insertions(+), 2 deletions(-)
Junio, All,
What about this patch?
It at least exposes bug in git-mailinfo wrt handling of multiline
subjects, and in very details documents it and adds a test for it.
Yes, my fixes are of 'low quality', but may I try to attract git
community attention one more time?
Thanks beforehand,
Kirill
P.S. original post with patch:
http://marc.info/?l=git&m=123031899307286&w=2
next prev parent reply other threads:[~2009-01-07 22:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-26 18:38 [PATCH RFC] mailinfo: correctly handle multiline 'Subject:' header Kirill Smelkov
2009-01-07 22:43 ` Kirill Smelkov [this message]
2009-01-08 8:13 ` [BUG PATCH " Junio C Hamano
2009-01-08 8:35 ` Junio C Hamano
2009-01-08 23:11 ` Kirill Smelkov
2009-01-10 10:12 ` Kirill Smelkov
2009-01-11 1:54 ` Junio C Hamano
2009-01-12 22:34 ` Kirill Smelkov
2009-01-12 23:27 ` Junio C Hamano
2009-01-13 9:39 ` Kirill Smelkov
2009-01-14 8:19 ` Kirill Smelkov
2009-01-08 10:08 ` [PATCH " Alexander Potashev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090107224342.GB4946@roro3 \
--to=kirr@landau.phys.spbu.ru \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).