git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org, peff@peff.net
Subject: Re: [PATCH v2 0/4] handle multiline in-body headers
Date: Mon, 19 Sep 2016 14:39:02 -0700	[thread overview]
Message-ID: <xmqqr38fd0y1.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <cover.1474319086.git.jonathantanmy@google.com> (Jonathan Tan's message of "Mon, 19 Sep 2016 14:08:49 -0700")

Jonathan Tan <jonathantanmy@google.com> writes:

> This is an iteration of the patch set after the discussion in
>  <cover.1474047135.git.jonathantanmy@google.com>.
>
> Changes:
> o largely rewritten to follow Junio's suggested design (refactor of
>   check_header to separate out ">From" and "[PATCH]", and an
>   is_inbody_header function performing an airtight check on whether a
>   line is an in-body header)
> o simpler try_convert_to_utf8 API
> o one file of the expected output of t/t5100/*0015 is modified (instead
>   of the input)
> o t/t5100/*0018--no-inbody-headers test files added
> o example in commit message improved following Peff's suggestion

Overall it looks much nicer, but I still do not understand why we
want to do try-convert-to-utf8.  The _only_ caller of that helper
function is in 4/4 where it tries to convert the line to see if a
line is a scissors line.

It seems to me that the only thing doing so gives us is that you
could later enhance the definition of what a scissors-line looks
like by adding unicode characters [*1*], but I would strongly
suggest not doing that kind of enhancement [*2*].  With the current
definition of what a scissors-line looks like, it can be checked
before you do the UTF-8 conversion, I think, which would mean that
the helper is not strictly necessary.

So...


[Footnotes]

*1* E.g. ✂ encoded in non-UTF8 may have to be converted to UTF-8
first before being recognized as such.

*2* Encouraging people to use non-ASCII that older version of Git
did not take for structural things like "what is a scissors line"
merely for the looks is a bad trade-off; patch e-mails that use the
enhanced definition will break for those with older version of Git,
and the benefit of "prettier scissors" is not really worth it, I
would think.






  parent reply	other threads:[~2016-09-19 21:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 21:08 [PATCH v2 0/4] handle multiline in-body headers Jonathan Tan
2016-09-19 21:08 ` [PATCH v2 1/4] mailinfo: separate in-body header processing Jonathan Tan
2016-09-19 21:08 ` [PATCH v2 2/4] mailinfo: refactor to support utf8 decode attempts Jonathan Tan
2016-09-19 21:08 ` [PATCH v2 3/4] mailinfo: make is_scissors_line take plain char * Jonathan Tan
2016-09-19 21:08 ` [PATCH v2 4/4] mailinfo: handle in-body header continuations Jonathan Tan
2016-09-19 21:39 ` Junio C Hamano [this message]
2016-09-20 17:17 ` [PATCH v3 0/3] handle multiline in-body headers Jonathan Tan
2016-09-20 23:06   ` Jeff King
2016-09-21 17:24   ` Junio C Hamano
2016-09-20 17:17 ` [PATCH v3 1/3] mailinfo: separate in-body header processing Jonathan Tan
2016-09-20 17:17 ` [PATCH v3 2/3] mailinfo: make is_scissors_line take plain char * Jonathan Tan
2016-09-20 17:17 ` [PATCH v3 3/3] mailinfo: handle in-body header continuations Jonathan Tan

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=xmqqr38fd0y1.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    --cc=peff@peff.net \
    /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).