All of lore.kernel.org
 help / color / mirror / Atom feed
From: Derrick Stolee <stolee@gmail.com>
To: Eric Sunshine <sunshine@sunshineco.com>, gitgitgadget@gmail.com
Cc: Git List <git@vger.kernel.org>,
	Junio C Hamano <gitster@pobox.com>,
	Derrick Stolee <dstolee@microsoft.com>
Subject: Re: [PATCH 1/1] t3206-range-diff.sh: cover single-patch case
Date: Wed, 12 Sep 2018 10:20:21 -0400	[thread overview]
Message-ID: <14fdfb44-8024-113b-8c34-2a60feedffff@gmail.com> (raw)
In-Reply-To: <CAPig+cQviMsbhdQty8DnBUWQx4hxNvH-FzXkNeHNBKy6mHGz5A@mail.gmail.com>

On 9/11/2018 5:34 PM, Eric Sunshine wrote:
> On Tue, Sep 11, 2018 at 4:26 PM Derrick Stolee via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
>> 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>
>> ---
>> diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh
>> @@ -154,4 +154,9 @@ do
>> +test_expect_success 'format-patch --range-diff as commentary' '
>> +       git format-patch --stdout --range-diff=HEAD~1 HEAD~1 >actual &&
>> +       grep -A 1 -e "\-\-\-" actual | grep "Range-diff:"
>> +'
> Aside from Junio's and Stefan's comments...
>
> Patch 6/14 [1], in addition to checking that a solo patch contains an
> interdiff, takes the extra step of checking that individual patches
> _don't_ contain an interdiff when --cover-letter is used. I wonder if
> the same should be done here, though I don't feel too strongly about
> it. If you do go that route, it might make sense to move this test to
> t4014 as neighbor to the --interdiff tests. The reason 10/14 [2] added
> the "git format-patch --range-diff" test to t3206 instead of t4014 was
> so it could do a thorough check of the embedded range-diff by re-using
> the specially crafted test repo set up by t3206. Your new test is much
> looser, thus could be moved alongside the --interdiff tests. Not a big
> deal, though. Either way is fine. Thanks for working on this.
>
> [1]: https://public-inbox.org/git/20180722095717.17912-7-sunshine@sunshineco.com/
> [2]: https://public-inbox.org/git/20180722095717.17912-11-sunshine@sunshineco.com/
Thanks for these links! In particular, [2] uses this line to test the 
inter-diff appears:

+    test_i18ngrep "^Interdiff:$" 0001-fleep.patch &&

That's a better way to test, especially with the translation. It would 
be enough for my needs.

Thanks,

-Stolee

P.S. Resending because apparently I had HTML in the last response


  reply	other threads:[~2018-09-12 14:20 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 [this message]
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   ` [PATCH v2 1/1] t3206-range-diff.sh: cover " Derrick Stolee via GitGitGadget

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=14fdfb44-8024-113b-8c34-2a60feedffff@gmail.com \
    --to=stolee@gmail.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.