git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Mathieu Lienard--Mayor <Mathieu.Lienard--Mayor@ensimag.imag.fr>,
	Remi Lespinet <remi.lespinet@ensimag.grenoble-inp.fr>,
	git@vger.kernel.org
Subject: Re: Formatting problem send_mail in version 2.10.0
Date: Wed, 12 Oct 2016 19:13:22 -0400	[thread overview]
Message-ID: <20161012231321.ar2csdmvhdya2q7r@sigill.intra.peff.net> (raw)
In-Reply-To: <xmqqtwch2srj.fsf@gitster.mtv.corp.google.com>

On Wed, Oct 12, 2016 at 01:53:52PM -0700, Junio C Hamano wrote:

> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> 
> >>> If it's not in the body of the message, then where is it?
> >>
> >> This point is clarified in the thread
> >> http://marc.info/?l=linux-wireless&m=147625930203434&w=2, which is
> >> with my upstream maintainer.
> >
> > Which explicitly states that the syntax is not [$number], but # $number,
> > right?
> 
> But I do not think that works, either.  Let's step back.
> 
> People write things like these
> 
>     Cc: Stable <stable@vger.kernel.org> # 4.8
>     Cc: Stable <stable@vger.kernel.org> [4.8+]
> 
> in the trailer part in the body of the message.  Are these lines
> meant to be usable if they appear as Cc: headers of an outgoing
> piece of e-mail as-is?

I think the answer is pretty clearly no. It's just that historically we
have auto-munged it into something useful. I think the viable options
are basically:

  1. Tell people not to do that, and to do something RFC compliant like
     "Stable [4.8+]" <stable@vger.kernel.org>. This is a little funny
     for git because we otherwise do not require things like
     rfc-compliant quoting for our name/email pairs. But it Just Works
     without anybody having to write extra code, or worry about corner
     cases in parsing.

  2. Drop everything after the trailing ">". This gives a valid rfc2822
     cc, and people can pick the "# 4.8" from the cc line in the body.

  3. Rewrite

       A <B@C> D

     into

       A D <B@C>

     regardless of what is in "D". This retains the information in the
     rfc2822 cc.

Starting from scratch, I'd say that (2) seems like a good combination of
simplicity and friendliness.  But (3) matches what we have done
historically (and still do at least for some values of "D", and
depending on the presence of Mail::Address).

Once we decide on a behavior, it seems like we should be able to apply
it consistently with or without Mail::Address by grabbing the bits after
the final ">".

Larry seems to be against (2), but I'm not sure I understand why pulling
the value from the in-body cc (which gets copied into the commit message
by git-am, too) would be a problem.

-Peff

  reply	other threads:[~2016-10-12 23:13 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-10 21:00 Formatting problem send_mail in version 2.10.0 Larry Finger
2016-10-10 21:48 ` Jeff King
2016-10-10 21:57   ` Jeff King
2016-10-10 23:35     ` Larry Finger
2016-10-10 23:43       ` Jeff King
2016-10-11  7:39     ` Matthieu Moy
2016-10-11 15:42       ` Larry Finger
2016-10-11 16:18         ` Matthieu Moy
2016-10-12  4:28           ` Larry Finger
2016-10-12  7:36             ` Matthieu Moy
2016-10-12 15:27               ` Larry Finger
2016-10-12 15:40                 ` Matthieu Moy
2016-10-12 15:40               ` Larry Finger
2016-10-12 15:45                 ` Matthieu Moy
2016-10-12 15:59                   ` Larry Finger
2016-10-12 20:53                   ` Junio C Hamano
2016-10-12 23:13                     ` Jeff King [this message]
2016-10-13  5:37                       ` Matthieu Moy
2016-10-13  5:47                         ` [PATCH] parse_mailboxes: accept extra text after <...> address Matthieu Moy
2016-10-13 15:33                       ` Formatting problem send_mail in version 2.10.0 Kevin Daudt
2016-10-13 16:05                         ` Matthieu Moy
2016-10-13  5:32                     ` Matthieu Moy
2016-10-14 17:04                       ` Junio C Hamano
2016-10-11 16:02       ` 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

  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=20161012231321.ar2csdmvhdya2q7r@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=Mathieu.Lienard--Mayor@ensimag.imag.fr \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=remi.lespinet@ensimag.grenoble-inp.fr \
    /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).