summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorSteven Drake <sdrake@xnet.co.nz>2010-02-17 12:39:34 +1300
committerJunio C Hamano <gitster@pobox.com>2010-03-06 19:57:44 -0800
commitae6c098f158dd306462024c5cb137b8f7f65cfbd (patch)
treed6e41a6cfeb592cf2f41bfc86c7403827c73280b /t
parente923eaeb901ff056421b9007adcbbce271caa7b6 (diff)
downloadgit-ae6c098f158dd306462024c5cb137b8f7f65cfbd.tar.gz
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 <sdrake@xnet.co.nz> Signed-off-by: Stephen Boyd <bebarino@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/t4014-format-patch.sh14
1 files changed, 14 insertions, 0 deletions
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 <scipient@example.com>\$" patch7
'
+test_expect_success 'command line To: header' '
+
+ git config --unset-all format.headers &&
+ git format-patch --to="R. E. Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch8 &&
+ grep "^To: R. E. Cipient <rcipient@example.com>\$" patch8
+'
+
+test_expect_success 'configuration To: header' '
+
+ git config format.to "R. E. Cipient <rcipient@example.com>" &&
+ git format-patch --stdout master..side | sed -e "/^\$/q" >patch9 &&
+ grep "^To: R. E. Cipient <rcipient@example.com>\$" patch9
+'
+
test_expect_success 'multiple files' '
rm -rf patches/ &&