git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v6] format-patch --signature-file <file>

From
Junio C Hamano <gitster@pobox.com>
Date
May 21, 2014, 22:48 UTC
Message-ID
<xmqq7g5eoiia.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140521222701.GA24537@hudson.localdomain>
Jeremiah Mahler <jmmahler@gmail.com> writes:
Show 16 quoted lines
> On Wed, May 21, 2014 at 03:15:55PM -0700, Junio C Hamano wrote:
>> Jeff King <peff@peff.net> writes:
>> 
>> Yeah, placing it in its own setup may be the best.  There are quite
>> a many set-ups outside the tests in this script from the olden days,
>> so I am OK if left it as-is and have a separate clean-up patch after
>> this topic settles.  I am also OK to add a new one "the new right way"
>> so that a later clean-up patch does not have to change what is added
>> in this step.
>
> I like the idea of limiting the scope of this data so it couldn't
> inadvertently impact later tests.
>
> But placing the same data inside multiple test cases creates duplication.
>
> Is there a way to define data once for a limited set of tests?

That is what Jeff ment by "used across many tests. ... it could go in its own setup".

In other words,
	test_expect_success 'prepare mail-signature input' '
        	cat >mail-signature <<-\EOF
                ...
                EOF
	'
	test_expect_success 'one test that uses mail-signature' '
        	use mail-signature &&
                test the output
	'
	test_expect_success 'another test that uses mail-signature' '
        	use mail-signature in a different way &&
                test the output
	'
Previous: Jeremiah MahlerNext: Jeremiah Mahler
Message 11 of 14 in “format-patch --signature-file <file>”
  1. format-patch --signature-file <file>Jeremiah Mahler, May 21, 2014
  2. format-patch --signature-file <file>Jeremiah Mahler, May 21, 2014
  3. Junio C HamanoMay 21, 2014
  4. Junio C HamanoMay 21, 2014
  5. Jeremiah MahlerMay 21, 2014
  6. Jeremiah MahlerMay 21, 2014
  7. Junio C HamanoMay 21, 2014
  8. Jeff KingMay 21, 2014
  9. Junio C HamanoMay 21, 2014
  10. Jeremiah MahlerMay 21, 2014
  11. Junio C HamanoMay 21, 2014
  12. Jeremiah MahlerMay 21, 2014
  13. Junio C HamanoMay 21, 2014
  14. Jeremiah MahlerMay 21, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.