Re: [GIT PULL] PCI fixes for v4.15

From: Bjorn Helgaas
Date: Wed Jan 24 2018 - 11:20:36 EST


On Tue, Jan 23, 2018 at 05:04:22PM -0800, Linus Torvalds wrote:
> On Tue, Jan 23, 2018 at 4:46 PM, Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote:
> > On Tue, Jan 23, 2018 at 12:49:22PM -0800, Linus Torvalds wrote:
> >>
> >> I suspect you're editing your mailbox, or you're using some broken
> >> mailer setup, or something (using some broken "export" function?),
> >> because you're corrupting Christian's name all the time:
> >
> > I'm not editing my mailbox, but I am using stgit. The "From:" header
> > uses encoded-word syntax for Christian's name, and I think stgit is
> > not decoding that when applying the patch.
>
> Ahh. Ok, that would explain it.
>
> > When I save the patch email message from mutt (or gmail, for that
> > matter), I see:
> >
> > From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" ...
>
> Yes. That's the standard locale encoding format for header values
> (mainly subject and author), since the
>
> Content-Type: text/plain; charset=utf-8
>
> only applies to the *body* of the email.
>
> So then the email handling tools have to handle that correctly, and as
> you noticed, "git am" does so:
>
> > Applying that patch with "git am" results in the correct
> >
> > Author: Christian König <ckoenig.leichtzumerken@xxxxxxxxx
>
> But apparently stgit does not:
>
> > Applying the identical patch with "stg import -M" results in
> >
> > Author: =?UTF-8?q?Christian=20K=C3=B6nig?= <ckoenig.leichtzumerken@xxxxxxxxx>
>
> I'm adding Peter Grayson and Catalin Marinas to the participants,
> since they seem to be the main stgit developers.
>
> Presumably there is either a flag for this (which should presumably be
> the default). Or if not, maybe stgit can just be fixed?
>
> [ I go off looking at the stgit sources. ]
>
> Oddly, stgit seems to even have a *testcase* for this:
>
> - t/t1800-import/email-qp:
>
> From: Inge =?utf-8?q?Str=C3=B6m?= <inge@xxxxxxxxx>
>
> and that test-case harkens back to 2006. I wonder why it doesn't seem
> to work for you and Christian.
>
> Bjorn, maybe you can send Catalin an example mbox?

Attaching the one I used above.