git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Derrick Stolee <dstolee@microsoft.com>
Subject: [PATCH v2 1/1] t3206-range-diff.sh: cover single-patch case
Date: Wed, 12 Sep 2018 07:31:03 -0700 (PDT)	[thread overview]
Message-ID: <277a4d2bd8bcb20323f0a5a01ccdf431f3c08350.1536762661.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.37.v2.git.gitgitgadget@gmail.com>

From: Derrick Stolee <dstolee@microsoft.com>

The commit 40ce4160 "format-patch: allow --range-diff to apply to
a lone-patch" added the ability to see a range-diff as commentary
after the commit message of a single patch series (i.e. [PATCH]
instead of [PATCH X/N]). However, this functionality was not
covered by a test case.

Add a simple test case that checks that a range-diff is written as
commentary to the patch.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 t/t3206-range-diff.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
index 3d7a2d8a4d..6babc0e276 100755
--- a/t/t3206-range-diff.sh
+++ b/t/t3206-range-diff.sh
@@ -154,4 +154,9 @@ do
 	'
 done
 
+test_expect_success 'format-patch --range-diff as commentary' '
+	git format-patch --stdout --range-diff=HEAD~1 HEAD~1 >actual &&
+	test_i18ngrep "^Range-diff:$" actual
+'
+
 test_done
-- 
gitgitgadget

      reply	other threads:[~2018-09-12 14:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 20:21 [PATCH 0/1] Add coverage for 'git format-patch --range-diff' single-patch case Derrick Stolee via GitGitGadget
2018-09-11 20:21 ` [PATCH 1/1] t3206-range-diff.sh: cover " Derrick Stolee via GitGitGadget
2018-09-11 20:58   ` Junio C Hamano
2018-09-11 21:11     ` Junio C Hamano
2018-09-11 21:09   ` Stefan Beller
2018-09-11 21:34   ` Eric Sunshine
2018-09-12 14:20     ` Derrick Stolee
2018-09-11 20:29 ` [PATCH 0/1] Add coverage for 'git format-patch --range-diff' " Derrick Stolee
2018-09-11 21:21 ` Eric Sunshine
2018-09-12 14:31 ` [PATCH v2 " Derrick Stolee via GitGitGadget
2018-09-12 14:31   ` Derrick Stolee via GitGitGadget [this message]

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

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

  git send-email \
    --in-reply-to=277a4d2bd8bcb20323f0a5a01ccdf431f3c08350.1536762661.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.
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 NNTP newsgroup(s).