git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frank Lichtenheld <frank@lichtenheld.de>
To: Yakov Lerner <iler.ml@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: bug in git-send-mail (the 'next' branch)
Date: Wed, 19 Mar 2008 09:03:18 +0100	[thread overview]
Message-ID: <20080319080318.GX18624@mail-vs.djpig.de> (raw)
In-Reply-To: <f36b08ee0803180652g68caa4cci21b0c59020c0fd07@mail.gmail.com>

On Tue, Mar 18, 2008 at 03:52:58PM +0200, Yakov Lerner wrote:
> There is a bug in git-send-mail in the 'next' branch. If first
> paragraph of the file in all indented by 1 space, and 1st line of the
> paragraph is at the first line of the file, then the whole
> paragraph disappears silently. If it's intentional, there should be a warning
> or something. And If it's *not* indented (as if it expects message
> header lines at this place), then it appears in the message body, so
> there is some inconsistency here.

If the first line of the file doesn't match either /^From / or
/^[-A-Za-z]+:\s/ send-email assumes the file is using the legacy format
from the original send_lots_of_email.pl script which is apparently
"first line of the message is who to CC, and second line is the subject of the
message." (comment from source code). The code doesn't use only the
first two lines but eats everything up the first whitespace line.
Which explains the behaviour you have seen.

There are a few things that could be fixed here:
1) Document the file formats this script expects in the man page. It
   doesn't talk about this at all atm.
2) Fix the legacy format support to only use the first two lines and
   warn/die if there is no whitespace line after that
3) Warn if the first line looks neither like a email header nor a
   email address
4) Perhaps in the future at some point deprecate the legacy support
   (1.6.0?)

Gruesse,
-- 
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/

      parent reply	other threads:[~2008-03-19 20:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-18 13:52 bug in git-send-mail (the 'next' branch) Yakov Lerner
2008-03-18 15:55 ` Jakub Narebski
2008-03-19  8:03 ` Frank Lichtenheld [this message]

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=20080319080318.GX18624@mail-vs.djpig.de \
    --to=frank@lichtenheld.de \
    --cc=git@vger.kernel.org \
    --cc=iler.ml@gmail.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.
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).