format-patch tests: check quoting/encoding in To: and Cc: headers
commit25dc8dad3a7c9f5426f549701e22eec1f894fec8
authorJan H. Schönherr <schnhrr@cs.tu-berlin.de>
Thu, 18 Oct 2012 14:43:34 +0000 (18 16:43 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Oct 2012 21:24:42 +0000 (18 14:24 -0700)
tree889df848bb670db29775c4646c8e726743ea640a
parent41dd00bad3d7614be7e8a41ed3f31878af86758b
format-patch tests: check quoting/encoding in To: and Cc: headers

git-format-patch does currently not parse user supplied extra header
values (e. g., --cc, --add-header) and just replays them. That forces
users to add them RFC 2822/2047 conform in encoded form, e.g.

    --cc '=?UTF-8?q?Jan=20H=2E=20Sch=C3=B6nherr?= <...>'

which is inconvenient. We would want to update git-format-patch to
accept human-readable input

    --cc 'Jan H. Schönherr <...>'

and handle the encoding, wrapping and quoting internally in the future,
similar to what is already done in git-send-email. The necessary code
should mostly exist in the code paths that handle the From: and Subject:
headers.

Whether we want to do this only for the git-format-patch options
--to and --cc (and the corresponding config options) or also for
user supplied headers via --add-header, is open for discussion.

For now, add test_expect_failure tests for To: and Cc: headers as a
reminder and fix tests that would otherwise fail should this get
implemented.

Signed-off-by: Jan H. Schönherr <schnhrr@cs.tu-berlin.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4014-format-patch.sh