From ae6c098f158dd306462024c5cb137b8f7f65cfbd Mon Sep 17 00:00:00 2001 From: Steven Drake Date: Wed, 17 Feb 2010 12:39:34 +1300 Subject: Add 'git format-patch --to=' option and 'format.to' configuration variable. Has the same functionality as the '--cc' option and 'format.cc' configuration variable but for the "To:" email header. Half of the code to support this was already there. With email the To: header usually more important than the Cc: header. [jc: tests are by Stephen Boyd] Signed-off-by: Steven Drake Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- t/t4014-format-patch.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 't/t4014-format-patch.sh') diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh index f2a2aaa2b9..830ddb0cbe 100755 --- a/t/t4014-format-patch.sh +++ b/t/t4014-format-patch.sh @@ -143,6 +143,20 @@ test_expect_success 'configuration headers and command line headers' ' grep "^ *S. E. Cipient \$" patch7 ' +test_expect_success 'command line To: header' ' + + git config --unset-all format.headers && + git format-patch --to="R. E. Cipient " --stdout master..side | sed -e "/^\$/q" >patch8 && + grep "^To: R. E. Cipient \$" patch8 +' + +test_expect_success 'configuration To: header' ' + + git config format.to "R. E. Cipient " && + git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 && + grep "^To: R. E. Cipient \$" patch9 +' + test_expect_success 'multiple files' ' rm -rf patches/ && -- cgit v1.3-6-g1900