summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b20a60d)
raw | patch | inline | side by side (parent: b20a60d)
author | Jay Soffian <jaysoffian@gmail.com> | |
Fri, 15 Feb 2008 21:53:36 +0000 (16:53 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 Feb 2008 06:16:34 +0000 (22:16 -0800) |
The function is intended to be fed one logical line at a time to
inspect, but a QP encoded raw input line can have more than one
lines, just like BASE64 encoded one.
Quoting LF as =0A may be unusual but RFC2045 allows it.
The issue was noticed and fixed by Jay Soffian. JC added a test
to protect the fix from regressing later.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
inspect, but a QP encoded raw input line can have more than one
lines, just like BASE64 encoded one.
Quoting LF as =0A may be unusual but RFC2045 allows it.
The issue was noticed and fixed by Jay Soffian. JC added a test
to protect the fix from regressing later.
Signed-off-by: Jay Soffian <jaysoffian@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-mailinfo.c | patch | blob | history | |
t/t5100-mailinfo.sh | patch | blob | history | |
t/t5100/info0009 | [new file with mode: 0644] | patch | blob |
t/t5100/msg0009 | [new file with mode: 0644] | patch | blob |
t/t5100/patch0009 | [new file with mode: 0644] | patch | blob |
t/t5100/sample.mbox | patch | blob | history |
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index 2600847974f8a44bdd2148da6ff82ecf761fb193..11f154b31fcbd5c788299855e7d69f54ae8c7e70 100644 (file)
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
switch (transfer_encoding) {
case TE_BASE64:
+ case TE_QP:
{
char *op = line;
diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh
index 9b1a74542a848ef702c1e6208d6ff2537b0f6ac0..d6c55c115779730fdef8d05fbdb039fe90e3fad7 100755 (executable)
--- a/t/t5100-mailinfo.sh
+++ b/t/t5100-mailinfo.sh
'git mailsplit -o. ../t5100/sample.mbox >last &&
last=`cat last` &&
echo total is $last &&
- test `cat last` = 8'
+ test `cat last` = 9'
for mail in `echo 00*`
do
diff --git a/t/t5100/info0009 b/t/t5100/info0009
--- /dev/null
+++ b/t/t5100/info0009
@@ -0,0 +1,5 @@
+Author: F U Bar
+Email: f.u.bar@example.com
+Subject: updates
+Date: Mon, 17 Sep 2001 00:00:00 +0900
+
diff --git a/t/t5100/msg0009 b/t/t5100/msg0009
--- /dev/null
+++ b/t/t5100/msg0009
@@ -0,0 +1,2 @@
+This is to fix diff-format documentation.
+
diff --git a/t/t5100/patch0009 b/t/t5100/patch0009
--- /dev/null
+++ b/t/t5100/patch0009
@@ -0,0 +1,13 @@
+diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
+index b426a14..97756ec 100644
+--- a/Documentation/diff-format.txt
++++ b/Documentation/diff-format.txt
+@@ -81,7 +81,7 @@ The "diff" formatting options can be customized via the
+ environment variable 'GIT_DIFF_OPTS'. For example, if you
+ prefer context diff:
+
+- GIT_DIFF_OPTS=-c git-diff-index -p $(cat .git/HEAD)
++ GIT_DIFF_OPTS=-c git-diff-index -p HEAD
+
+
+ 2. When the environment variable 'GIT_EXTERNAL_DIFF' is set, the
diff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox
index 070c1661b9be8530e619cd0c297673d1e5e958a3..0476b96c33de8bbc6c4b3bc4f510e9fc50aa6440 100644 (file)
--- a/t/t5100/sample.mbox
+++ b/t/t5100/sample.mbox
Hey you forgot the patch!
+From nobody Mon Sep 17 00:00:00 2001
+From: A U Thor <a.u.thor@example.com>
+Date: Mon, 17 Sep 2001 00:00:00 +0900
+Mime-Version: 1.0
+Content-Type: Text/Plain; charset=us-ascii
+Content-Transfer-Encoding: Quoted-Printable
+
+=0A=0AFrom: F U Bar <f.u.bar@example.com>
+Subject: [PATCH] updates=0A=0AThis is to fix diff-format documentation.
+
+diff --git a/Documentation/diff-format.txt b/Documentation/diff-format.txt
+index b426a14..97756ec 100644
+--- a/Documentation/diff-format.txt
++++ b/Documentation/diff-format.txt
+@@ -81,7 +81,7 @@ The "diff" formatting options can be customized via the
+ environment variable 'GIT_DIFF_OPTS'. For example, if you
+ prefer context diff:
+=20
+- GIT_DIFF_OPTS=3D-c git-diff-index -p $(cat .git/HEAD)
++ GIT_DIFF_OPTS=3D-c git-diff-index -p HEAD
+=20
+=20
+ 2. When the environment variable 'GIT_EXTERNAL_DIFF' is set, the