summaryrefslogtreecommitdiff
path: root/t/t6020-merge-df.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-08-06 20:08:12 -0500
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-08-06 20:50:15 -0700
commit0fcb2caf29d2ff9822cbb3440c5c2c495cf430f0 (patch)
tree7416e4a47cde5389d1f8698f119feaaf06de5a03 /t/t6020-merge-df.sh
parentMerge branch 'sb/read-tree' (diff)
downloadtgif-0fcb2caf29d2ff9822cbb3440c5c2c495cf430f0.tar.xz
am: allow individual e-mail files as input
We traditionally allowed a mbox file or a directory name of a maildir (but never an individual file inside 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. Running mailsplit on such a file feels stupid, but it does not hurt. 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. A test is added to t4150 to demonstrate this feature. Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6020-merge-df.sh')
0 files changed, 0 insertions, 0 deletions