git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Miklos Vajna <vmiklos@frugalware.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Steven Drake <sdrake@xnet.co.nz>, git@vger.kernel.org
Subject: [PATCH] Add tests for git format-patch --to and format.to config option
Date: Sat, 6 Mar 2010 01:39:48 +0100	[thread overview]
Message-ID: <20100306003946.GD27414@genesis.frugalware.org> (raw)
In-Reply-To: <7v7hptt0mr.fsf@alter.siamese.dyndns.org>

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
---

On Wed, Mar 03, 2010 at 04:02:20PM -0800, Junio C Hamano <gitster@pobox.com> wrote:
> * sd/format-patch-to (2010-02-17) 1 commit
>  - Add 'git format-patch --to=' option and 'format.to' configuration variable.
>
> Shouldn't be too hard to add tests to t4014; other than that looked ready
> for 'next'.

Here is a patch that does so.

 t/t4014-format-patch.sh |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index f2a2aaa..9305c98 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -531,6 +531,26 @@ test_expect_success 'format-patch --in-reply-to' '
 	grep "^References: <baz@foo.bar>" patch8
 '
 
+test_expect_success 'command line to' '
+
+	git format-patch --to="R. E. Cipient <rcipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch9 &&
+	grep "^To: R. E. Cipient <rcipient@example.com>" patch9
+'
+
+test_expect_success 'configuration to' '
+
+	git config --replace-all format.to "R. E. Cipient <rcipient@example.com>" &&
+	git format-patch --stdout master..side | sed -e "/^\$/q" >patch10 &&
+	grep "^To: R. E. Cipient <rcipient@example.com>" patch10
+'
+
+test_expect_success 'additional command line to' '
+
+	git format-patch --to="S. E. Cipient <scipient@example.com>" --stdout master..side | sed -e "/^\$/q" >patch11 &&
+	grep "^To: R. E. Cipient <rcipient@example.com>,\$" patch11 &&
+	grep "^ *S. E. Cipient <scipient@example.com>\$" patch11
+'
+
 test_expect_success 'format-patch --signoff' '
 	git format-patch -1 --signoff --stdout |
 	grep "^Signed-off-by: $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL>"
-- 
1.7.0

  parent reply	other threads:[~2010-03-06  0:40 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04  0:02 What's cooking in git.git (Mar 2010, #01; Wed, 03) Junio C Hamano
2010-03-04  0:36 ` Adam Simpkins
2010-03-04  8:26 ` Björn Gustavsson
2010-03-04 18:26   ` Junio C Hamano
2010-03-04 12:09 ` Tay Ray Chuan
2010-03-04 18:26   ` Junio C Hamano
2010-03-04 21:42 ` Junio C Hamano
2010-03-05  0:49   ` Junio C Hamano
2010-03-05 16:25     ` git reset --keep (Re: What's cooking in git.git (Mar 2010, #01; Wed, 03)) Jonathan Nieder
2010-03-05 21:08       ` Christian Couder
2010-03-05 17:32     ` What's cooking in git.git (Mar 2010, #01; Wed, 03) Christian Couder
2010-03-04 22:21 ` Thomas Rast
2010-03-05  1:30 ` Mark Lodato
2010-03-05  1:32   ` Mark Lodato
2010-03-05  3:23   ` Junio C Hamano
2010-03-06  0:39 ` Miklos Vajna [this message]
2010-03-06  2:21   ` [PATCH] Add tests for git format-patch --to and format.to config option Junio C Hamano
2010-03-06 21:06     ` [PATCH] format-patch --to: overwrite format.to contents, don't append it Miklos Vajna
2010-03-07  0:06     ` [PATCH] Add tests for git format-patch --to and format.to config option Stephen Boyd
2010-03-07  1:20       ` Miklos Vajna
2010-03-07  3:42       ` Junio C Hamano
2010-03-07  9:43         ` Stephen Boyd
2010-03-07 18:38           ` Junio C Hamano
2010-03-07 21:33             ` [PATCH 0/4] format-patch and send-email ignoring config settings Stephen Boyd
2010-03-07 22:46               ` [PATCHv2 0/3] " Stephen Boyd
2010-03-07 22:46               ` [PATCHv2 1/3] format-patch: use a string_list for headers Stephen Boyd
2010-03-07 22:46               ` [PATCHv2 2/3] format-patch: add --no-cc, --no-to, and --no-add-headers Stephen Boyd
2010-03-07 22:46               ` [PATCHv2 3/3] send-email: add --no-cc, --no-to, and --no-bcc Stephen Boyd
2010-03-09  2:44               ` [PATCH 0/4] format-patch and send-email ignoring config settings Junio C Hamano
2010-03-07 21:33             ` [PATCH 1/4] send-email: actually add bcc headers Stephen Boyd
2010-03-07 21:53               ` Stephen Boyd
2010-03-07 21:33             ` [PATCH 2/4] format-patch: use a string_list for headers Stephen Boyd
2010-03-07 21:44               ` Erik Faye-Lund
2010-03-07 21:54                 ` Stephen Boyd
2010-03-07 22:13                 ` Johannes Schindelin
2010-03-07 21:33             ` [PATCH 3/4] format-patch: add --no-cc, --no-to, and --no-add-headers Stephen Boyd
2010-03-07 21:33             ` [PATCH 4/4] send-email: add --no-cc, --no-to, and --no-bcc Stephen Boyd
2010-03-10  3:53             ` [PATCH] Add tests for git format-patch --to and format.to config option Steven Drake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100306003946.GD27414@genesis.frugalware.org \
    --to=vmiklos@frugalware.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sdrake@xnet.co.nz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).