diff options
author | Kevin Daudt <me@ikke.info> | 2016-09-28 21:52:32 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-09-28 13:21:18 -0700 |
commit | f357e5de31595c28a303aaf5443c26f492441a6f (patch) | |
tree | a6fd4945bc727bd523b17e7562ec989bc025e8bb /t/t5100-mailinfo.sh | |
parent | ee4d679f579b957a997830cbcd65741d9428d732 (diff) | |
download | git-f357e5de31595c28a303aaf5443c26f492441a6f.tar.gz |
mailinfo: unescape quoted-pair in header fieldskd/mailinfo-quoted-string
rfc2822 has provisions for quoted strings in structured header fields,
but also allows for escaping these with so-called quoted-pairs.
The only thing git currently does is removing exterior quotes, but
quotes within are left alone.
Remove exterior quotes and remove escape characters so that they don't
show up in the author field.
Signed-off-by: Kevin Daudt <me@ikke.info>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100-mailinfo.sh')
-rwxr-xr-x | t/t5100-mailinfo.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t5100-mailinfo.sh b/t/t5100-mailinfo.sh index 56988b7116..45d228ebc8 100755 --- a/t/t5100-mailinfo.sh +++ b/t/t5100-mailinfo.sh @@ -144,4 +144,18 @@ test_expect_success 'mailinfo unescapes with --mboxrd' ' test_cmp expect mboxrd/msg ' +test_expect_success 'mailinfo handles rfc2822 quoted-string' ' + mkdir quoted-string && + git mailinfo /dev/null /dev/null <"$DATA/quoted-string.in" \ + >quoted-string/info && + test_cmp "$DATA/quoted-string.expect" quoted-string/info +' + +test_expect_success 'mailinfo handles rfc2822 comment' ' + mkdir comment && + git mailinfo /dev/null /dev/null <"$DATA/comment.in" \ + >comment/info && + test_cmp "$DATA/comment.expect" comment/info +' + test_done |