From: Nicolas Sebrecht Date: Thu, 06 Aug 2009 17:07:50 GMT Subject: [PATCH v7] mailinfo: allow e-mail files as input Message-ID: <538521a8fef8b898717e52e4d1913fdf24593679.1249577595.git.nicolas.s.dev@gmx.fr> In-Reply-To: <20090717220424.GA12968@vidovic> 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. Credit on most of how this has been written goes to Junio. Signed-off-by: Nicolas Sebrecht --- This round after v1.6.4 release and includes last comments pointed out in Subject: Re: [PATCH v6] mailinfo: allow e-mail files as input From: Junio C Hamano Date: Thu, 16 Jul 2009 18:05:10 -0700 Message-ID: <7v1vog6rw9.fsf@alter.siamese.dyndns.org> Subject: [PATCH v6] Re: mailinfo: allow e-mail files as input From: Nicolas Sebrecht Date: Sat, 18 Jul 2009 00:04:24 +0200 Message-ID: <20090717220424.GA12968@vidovic> Documentation/git-am.txt | 13 ++++++++----- git-am.sh | 14 ++++++++++++++ t/t4150-am.sh | 30 ++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 5 deletions(-) diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt index 32e689b..a19a82d 100644 --- a/Documentation/git-am.txt +++ b/Documentation/git-am.txt @@ -14,7 +14,7 @@ SYNOPSIS [--ignore-date] [--whitespace=