From: Nanako Shiraishi <nanako3@lavabit.com>
To: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
Cc: <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
Stephen Boyd <bebarino@gmail.com>,
Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
Subject: Re: [PATCH v6] mailinfo: allow e-mail files as input
Date: Fri, 17 Jul 2009 19:06:01 +0900 [thread overview]
Message-ID: <20090717190601.6117@nanako3.lavabit.com> (raw)
In-Reply-To: <f006bbb9c754c80c133798ff70db5b5291dae060.1247766192.git.nicolas.s.dev@gmx.fr>
Quoting Nicolas Sebrecht <nicolas.s.dev@gmx.fr>:
> We traditionally allowed a mbox file or a directory name of a maildir to be
> given to "git am". Even though an individual file in a maildir (or more
> generally, a piece of RFC2822 e-mail) is not a mbox file, it contains enough
> information to create a commit out of it, so there is no reason to reject one.
> It allows to run 'git am' with an email list argument, something like:
>
> $ git am dir/*
> $ git am email1 email2
>
> This builds on top of a5a6755 (git-am foreign patch support: introduce
> patch_format, 2009-05-27) that introduced mailbox format detection. The
> codepath to deal with a mbox requires it to begin with "From " line and
> also allows it to begin with "From: ", but a random piece of e-mail can
> and often do begin with any valid RFC2822 header lines.
>
> Instead of checking the first line, we extract all the lines up to the
> first empty line, and make sure they look like e-mail headers.
>
> Signed-off-by: Nicolas Sebrecht <nicolas.s.dev@gmx.fr>
> ---
Could you summarize the changes since v5 here? Is the change the same as Junio's patch (if so shouldn't you credit him in the commit log message)?
> Documentation/git-am.txt | 6 ++--
> git-am.sh | 14 ++++++++++++
> t/t4150-am.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 71 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
> index 32e689b..2a930a7 100644
> --- a/Documentation/git-am.txt
> +++ b/Documentation/git-am.txt
> @@ -14,7 +14,7 @@ SYNOPSIS
> [--ignore-date]
> [--whitespace=<option>] [-C<n>] [-p<n>] [--directory=<dir>]
> [--reject] [-q | --quiet]
> - [<mbox> | <Maildir>...]
> + [<mbox> | <Maildir>... | <email>... ]
> 'git am' (--skip | --resolved | --abort)
>
> DESCRIPTION
> @@ -25,8 +25,8 @@ current branch.
>
> OPTIONS
> -------
> -<mbox>|<Maildir>...::
> - The list of mailbox files to read patches from. If you do not
> +<mbox>|<Maildir>...|<email>...::
> + The list of mailbox files or email to read patches from. If you do not
> supply this argument, the command reads from the standard input.
> If you supply directories, they will be treated as Maildirs.
>
I wasn't following the discussion closely, and at first I didn't understand this change to the documentation, because it doesn't say how <mbox> and <email> are different. I'm afraid many readers of the documentation don't understand it either.
Why does this description have ... in it? If I'm reading it correctly, the code in check_patch_format function checks only the first file.
--
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/
next prev parent reply other threads:[~2009-07-17 10:06 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 22:19 [PATCH v3] git-am: fix maildir support regression: accept email file as patch Nicolas Sebrecht
2009-07-15 22:43 ` [PATCH v3] " Nicolas Sebrecht
2009-07-15 22:54 ` [PATCH v3] " Junio C Hamano
2009-07-15 23:56 ` Junio C Hamano
2009-07-16 1:00 ` [PATCH v3] " Nicolas Sebrecht
2009-07-16 2:06 ` Nicolas Sebrecht
2009-07-16 2:30 ` Junio C Hamano
2009-07-16 2:59 ` Nicolas Sebrecht
2009-07-16 0:49 ` Nicolas Sebrecht
2009-07-16 2:41 ` Junio C Hamano
2009-07-16 4:05 ` [PATCH v4] git-am: allow e-mail file(s) as input Nicolas Sebrecht
2009-07-16 4:10 ` [PATCH v4] " Nicolas Sebrecht
2009-07-16 5:23 ` [PATCH v5] " Nicolas Sebrecht
2009-07-16 7:09 ` Stephen Boyd
2009-07-16 7:24 ` Junio C Hamano
2009-07-16 7:50 ` [PATCH v5] " Nicolas Sebrecht
2009-07-16 8:06 ` Nicolas Sebrecht
2009-07-16 8:17 ` Johannes Sixt
2009-07-16 8:12 ` Johannes Sixt
2009-07-16 17:45 ` [PATCH v6] mailinfo: allow e-mail files " Nicolas Sebrecht
2009-07-17 1:05 ` Junio C Hamano
2009-07-17 2:20 ` [PATCH v6] " Nicolas Sebrecht
2009-07-17 10:06 ` Nanako Shiraishi [this message]
2009-07-17 19:54 ` [PATCH v6] " Junio C Hamano
2009-07-17 22:04 ` [PATCH v6] " Nicolas Sebrecht
2009-08-06 17:07 ` [PATCH v7] " Nicolas Sebrecht
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=20090717190601.6117@nanako3.lavabit.com \
--to=nanako3@lavabit.com \
--cc=bebarino@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=giuseppe.bilotta@gmail.com \
--cc=nicolas.s.dev@gmx.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.
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).