mailinfo: do not concatenate charset= attribute values from mime headers
authorJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2012 21:17:58 +0000 (14:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 17 Sep 2012 22:24:52 +0000 (15:24 -0700)
commit176943b9658b1fa9ae3972156100d831d19c3576
tree19b39b2c585260ef38740ba3b2f4c9d78d5cc777
parent785ee4960c3d334cbc2b17ab74d2cebdf1b4db64
mailinfo: do not concatenate charset= attribute values from mime headers

"Content-type: text/plain; charset=UTF-8" header should not appear
twice in the input, but it is always better to gracefully deal with
such a case.  The current code concatenates the value to the values
we have seen previously, producing nonsense such as "utf8UTF-8".

Instead of concatenating, forget the previous value and use the last
value we see.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/mailinfo.c
t/t5100-mailinfo.sh
t/t5100/info0017 [new file with mode: 0644]
t/t5100/msg0017 [new file with mode: 0644]
t/t5100/patch0017 [new file with mode: 0644]
t/t5100/sample.mbox