git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Johan Hovold <johan@kernel.org>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
	Kevin Daudt <me@ikke.info>, Junio C Hamano <gitster@pobox.com>,
	Larry Finger <Larry.Finger@lwfinger.net>
Subject: Re: body-CC-comment regression
Date: Thu, 16 Feb 2017 19:16:57 +0100	[thread overview]
Message-ID: <vpqlgt6hug6.fsf@anie.imag.fr> (raw)
In-Reply-To: <20170216174924.GB2625@localhost> (Johan Hovold's message of "Thu, 16 Feb 2017 18:49:24 +0100")

Johan Hovold <johan@kernel.org> writes:

> Hi,
>
> I recently noticed that after an upgrade, git-send-email (2.10.2)
> started aborting when trying to send patches that had a linux-kernel
> stable-tag in its body. For example,
>
> 	Cc: <stable@vger.kernel.org>	# 4.4
>
> was now parsed as
>
> 	"stable@vger.kernel.org#4.4"
>
> which resulted in
>
> 	Died at /usr/libexec/git-core/git-send-email line 1332, <FIN> line 1.

This has changed in e3fdbcc8e1 (parse_mailboxes: accept extra text after
<...> address, 2016-10-13), released v2.11.0 as you noticed:

> The problem with the resulting fixes that are now in 2.11.1 is that
> git-send-email no longer discards the trailing comment but rather
> shoves it into the name after adding some random white space:
>
> 	"# 3 . 3 . x : 1b9508f : sched : Rate-limit newidle" <stable@vger.kernel.org>"
>
> This example is based on the example from
> Documentation/process/stable-kernel-rules.rst:
>
> 	Cc: <stable@vger.kernel.org> # 3.3.x: 1b9508f: sched: Rate-limit newidle
>
> and this format for stable-tags has been documented at least since 2009
> and 8e9b9362266d ("Doc/stable rules: add new cherry-pick logic"), and
> has been supported by git since 2012 and 831a488b76e0 ("git-send-email:
> remove garbage after email address") I believe.
>
> Can we please revert to the old behaviour of simply discarding such
> comments (from body-CC:s) or at least make it configurable through a
> configuration option?

The problem is that we now accept list of emails instead of just one
email, so it's hard to define what "comments after the email", for
example

Cc: <foo@example.com> # , <boz@example.com>

Is not accepted as two emails.

So, just stripping whatever comes after # before parsing the list of
emails would change the behavior once more, and possibly break other
user's flow. Dropping the garbage after the email while parsing is
possible, but only when we use our in-house parser (and we currently use
Perl's Mail::Address when available).

So, a proper fix is far from obvious, and unfortunately I won't have
time to work on that, at least not before a while.

OTOH, the current behavior isn't that bad. It accepts the input, and
extracts a valid email out of it. Just the display name is admitedly
suboptimal ...

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  parent reply	other threads:[~2017-02-16 18:17 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16 17:49 body-CC-comment regression Johan Hovold
2017-02-16 17:59 ` Junio C Hamano
2017-02-16 18:14   ` Johan Hovold
2017-02-16 18:16 ` Matthieu Moy [this message]
2017-02-17 11:06   ` Johan Hovold
2017-02-17 13:16     ` Matthieu Moy
2017-02-17 16:42       ` Johan Hovold
2017-02-17 16:58         ` Matthieu Moy
2017-02-17 17:30           ` Johan Hovold
2017-02-17 18:18           ` Junio C Hamano
2017-02-17 18:23             ` Johan Hovold
2017-02-17 18:28               ` Junio C Hamano
2017-02-17 18:44                 ` Matthieu Moy
2017-02-17 20:05                   ` Junio C Hamano
2017-02-17 20:20                     ` Matthieu Moy
2017-02-17 22:22                       ` Junio C Hamano
2017-02-17 23:04                         ` Junio C Hamano
2017-02-20 11:44                           ` [PATCH v2] send-email: only allow one address per body tag Johan Hovold
2017-02-20 12:10                             ` Matthieu Moy
2017-02-23 18:53                               ` Junio C Hamano
2017-02-26 20:45                                 ` Matthieu Moy
2017-02-17 17:38       ` body-CC-comment regression Linus Torvalds

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=vpqlgt6hug6.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=Larry.Finger@lwfinger.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johan@kernel.org \
    --cc=me@ikke.info \
    --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).