From 34fc5cefa7068492d5103b40dca1b55f69986eb8 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 26 Feb 2007 11:10:59 -0800 Subject: mailinfo: do not get confused with logical lines that are too long. It basically considers all the continuation lines to be lines of their own, and if the total line is bigger than what we can fit in it, we just truncate the result rather than stop in the middle and then get confused when we try to parse the "next" line (which is just the remainder of the first line). [jc: added test, and tightened boundary a bit per list discussion.] Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- t/t5100-mailinfo.sh | 2 +- t/t5100/info0006 | 5 ++++ t/t5100/msg0006 | 2 ++ t/t5100/patch0006 | 14 +++++++++++ t/t5100/sample.mbox | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 t/t5100/info0006 create mode 100644 t/t5100/msg0006 create mode 100644 t/t5100/patch0006 (limited to 't') diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh index 17c1b80b5b..4d2b781a18 100755 --- a/t/t5100-mailinfo.sh +++ b/t/t5100-mailinfo.sh @@ -11,7 +11,7 @@ test_expect_success 'split sample box' \ 'git-mailsplit -o. ../t5100/sample.mbox >last && last=`cat last` && echo total is $last && - test `cat last` = 5' + test `cat last` = 6' for mail in `echo 00*` do diff --git a/t/t5100/info0006 b/t/t5100/info0006 new file mode 100644 index 0000000000..8c052777e0 --- /dev/null +++ b/t/t5100/info0006 @@ -0,0 +1,5 @@ +Author: A U Thor +Email: a.u.thor@example.com +Subject: a commit. +Date: Fri, 9 Jun 2006 00:44:16 -0700 + diff --git a/t/t5100/msg0006 b/t/t5100/msg0006 new file mode 100644 index 0000000000..b275a9a9b2 --- /dev/null +++ b/t/t5100/msg0006 @@ -0,0 +1,2 @@ +Here is a patch from A U Thor. + diff --git a/t/t5100/patch0006 b/t/t5100/patch0006 new file mode 100644 index 0000000000..8ce155167d --- /dev/null +++ b/t/t5100/patch0006 @@ -0,0 +1,14 @@ +--- + foo | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/foo b/foo +index 9123cdc..918dcf8 100644 +--- a/foo ++++ b/foo +@@ -1 +1 @@ +-Fri Jun 9 00:44:04 PDT 2006 ++Fri Jun 9 00:44:13 PDT 2006 +-- +1.4.0.g6f2b + diff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox index a76845465a..86bfc27147 100644 --- a/t/t5100/sample.mbox +++ b/t/t5100/sample.mbox @@ -315,3 +315,74 @@ To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html +From nobody Mon Sep 17 00:00:00 2001 +From: A U Thor +References: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Date: Fri, 9 Jun 2006 00:44:16 -0700 +Subject: [PATCH] a commit. + +Here is a patch from A U Thor. + +--- + foo | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/foo b/foo +index 9123cdc..918dcf8 100644 +--- a/foo ++++ b/foo +@@ -1 +1 @@ +-Fri Jun 9 00:44:04 PDT 2006 ++Fri Jun 9 00:44:13 PDT 2006 +-- +1.4.0.g6f2b + -- cgit v1.2.3