From: Jeff King <peff@peff.net>
To: Simon Ser <contact@emersion.fr>
Cc: "René Scharfe" <l.s.r@web.de>,
git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] format-patch: fix ignored encode_email_headers for cover letter
Date: Fri, 10 Nov 2023 16:48:59 -0500 [thread overview]
Message-ID: <20231110214859.GE2758295@coredump.intra.peff.net> (raw)
In-Reply-To: <VTz8XT3MCqWUh1HFQon62NxmGJiYFfNmBeWTtR8MwmeuaSkovfBJ02P-S79GsD94XwlxlrL6W80YZ8OwfpDd1BqA0E4GwFQlDKN5DWq0Qtg=@emersion.fr>
On Fri, Nov 10, 2023 at 10:36:22AM +0000, Simon Ser wrote:
> > I don't think that answering those questions needs to hold up your
> > patch. We can take it as a quick fix for a real bug, and then anybody
> > interested can dig further as a separate topic on top.
>
> These are good questions indeed. Unfortunately I don't hink I'll have time to
> work on this though.
That's OK. I think it's fine to stop here for now.
> > Some of these long lines (and the in-string newlines!) make this ugly
> > and hard to read. But it is also just copying the already-ugly style of
> > nearby tests. So I'm OK with that. But a prettier version might be:
> >
> > test_expect_success 'cover letter respects --encode-email-headers' '
> > test_config branch.rebuild-1.description "Café?" &&
> > git checkout rebuild-1 &&
> > git format-patch --stdout --encode-email-headers \
> > --cover-letter --cover-from-description=subject \
> > main >actual &&
> > ...
> > '
>
> Yeah, that sounds better indeed. Let me know if you want me to resend a cleaner
> version of the test.
I don't have a strong opinion, so I'd leave it up to you.
> > I also wondered if we could be just be testing this much more easily
> > with another header like "--to". But I guess that would be found in both
> > the cover letter and the actual patches (we also don't seem to encode
> > it even in the regular patches; is that a bug?).
>
> That sounds like another bug indeed… But maybe that'll be harder to fix. To
> Q-encode this field one needs to split off the full name and actual mail
> address ("André <andre@example.org>" would be split into "André" and
> "andre@example.org"), then Q-encode the full name, then join the strings
> together again. In particular, it's incorrect to Q-encode the full string.
Yeah, without even looking at the code, I had a suspicion that this
would be an issue. I doubt that format-patch is doing much parsing at
all of what we feed it via --to.
-Peff
next prev parent reply other threads:[~2023-11-10 21:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 11:19 [PATCH] format-patch: fix ignored encode_email_headers for cover letter Simon Ser
2023-11-09 18:35 ` Jeff King
2023-11-10 10:36 ` Simon Ser
2023-11-10 21:48 ` Jeff King [this message]
2023-11-12 18:38 ` René Scharfe
2023-11-13 19:00 ` Jeff King
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=20231110214859.GE2758295@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=contact@emersion.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
/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).