git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Emma Brooks <me@pluvano.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Denton Liu <liu.denton@gmail.com>,
	Eric Sunshine <sunshine@sunshineco.com>,
	Jeff King <peff@peff.net>
Subject: Re: [PATCH] format-patch: teach --no-encode-headers
Date: Tue, 7 Apr 2020 03:46:22 +0000	[thread overview]
Message-ID: <20200407034622.GA42812@pluvano.com> (raw)
In-Reply-To: <xmqqd08lwatm.fsf@gitster.c.googlers.com>

On 2020-04-05 20:29:57-0700, Junio C Hamano wrote:
> Is the RFC2047 the only thing we do to message headers?  What I am
> trying is to figure out if "encode-headers - yes/no?" would be a
> stable (iow, would we be gaining other kinds of encoding over time?)
> and well-defined (iow, is there a case where one kind of 'encoding'
> is still desirable while disabling other kinds of 'encoding' is
> wanted?) question.  If there is any doubt in your answers to the
> above question, we may have to make sure the name of the option
> makes it clear to users what kind of encoding we're talking about.

It's also too vague and it's not entirely clear from the option itself
what sort of encoding it refers to. I will change it to
--[no-]q-encode-headers and format.qEncodeHeaders in v2 unless there are
other suggestions.

> > +--[no-]encode-headers::
> 
> I think we'd want to standadize on writing these out, i.e.
> 
>         --encode-headers::
>         --no-encode-headers::
> 
> so let's follow that when adding a new option.

OK.

> > +	Encode email headers that have non-ASCII characters with
> > +	"Q-encoding", instead of outputting the headers verbatim. The
> 
> I wonder if calling RFC2047 out helps readers here, when they wonder
> what Q is and how they can decipher it.

I'll reference the RFC directly in v2.

> > +	default is `--encode-headers` unless the `format.encodeHeaders`
> > +	configuration variable is set.
> 
> I am wondering if we can go even shorter, e.g.
> 
> 	The default is set to the value of `format.encodeHeaders`
> 	configuration variable.

OK, I'll go with that.

> > -		if (needs_rfc2047_encoding(namebuf, namelen)) {
> > +		if (pp->encode_headers &&
> > +				needs_rfc2047_encoding(namebuf, namelen)) {
> 
> Don't overly indent the second line like this.  The same comment
> applies to the next hunk (not quoted).
> 
> Thanks.

OK.

  reply	other threads:[~2020-04-07  3:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-05 23:11 [PATCH] format-patch: teach --no-encode-headers Emma Brooks
2020-04-06  3:04 ` brian m. carlson
2020-04-06 13:30   ` Jeff King
2020-04-06 15:17     ` brian m. carlson
2020-04-06 15:30       ` Jeff King
2020-04-06  3:29 ` Junio C Hamano
2020-04-07  3:46   ` Emma Brooks [this message]
2020-04-07 19:37     ` Junio C Hamano
2020-04-07 20:31       ` Jeff King
2020-04-07 22:20         ` Junio C Hamano
2020-04-08  4:08       ` Emma Brooks
2020-04-07  5:17 ` [PATCH v2] format-patch: teach --no-q-encode-headers Emma Brooks
2020-04-07  7:40   ` Danh Doan
2020-04-08  3:57     ` Emma Brooks
2020-04-08  4:31   ` [PATCH v3] format-patch: teach --no-encode-email-headers Emma Brooks

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200407034622.GA42812@pluvano.com \
    --to=me@pluvano.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liu.denton@gmail.com \
    --cc=peff@peff.net \
    --cc=sunshine@sunshineco.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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).