]> git.ipfire.org Git - thirdparty/git.git/commit - mailinfo.c
mailinfo: unescape quoted-pair in header fields
authorKevin Daudt <me@ikke.info>
Wed, 28 Sep 2016 19:52:32 +0000 (21:52 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Sep 2016 20:21:18 +0000 (13:21 -0700)
commitf357e5de31595c28a303aaf5443c26f492441a6f
treea6fd4945bc727bd523b17e7562ec989bc025e8bb
parentee4d679f579b957a997830cbcd65741d9428d732
mailinfo: unescape quoted-pair in header fields

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>
mailinfo.c
t/t5100-mailinfo.sh
t/t5100/comment.expect [new file with mode: 0644]
t/t5100/comment.in [new file with mode: 0644]
t/t5100/quoted-string.expect [new file with mode: 0644]
t/t5100/quoted-string.in [new file with mode: 0644]