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

Re: [PATCH] t7610 test for mktemp existence

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2016, 19:15 UTC
Message-ID
<xmqqinwishme.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqr3b6sk08.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 12 quoted lines
>> -test_expect_success 'temporary filenames are used with mergetool.writeToTemp' '
>> +test_lazy_prereq MKTEMP '
>> +	tempdir=$(mktemp -d -t foo.XXX) &&
>> +	test -d "$tempdir"
>> +'
>
> This makes me wonder what would happen to the leftover directory,
> though.  Would it be a better idea to clean it up as well, i.e.
>
> 	tempdir=$(mktemp -d -t foo.XXXXXX) &&
> 	test -d "$tempdir" &&
>         rmdir "$tempdir"

It turns out that this is not necessary since day one of lazy_prereq. I forgot what I wrote in 04083f27 (test: allow prerequisite to be evaluated lazily, 2012-07-26).

Thanks.
Previous: Jeff King
Message 4 of 4 in “t7610 test for mktemp existence”
  1. t7610 test for mktemp existenceArmin Kunaschik, Jul 2, 2016
  2. Junio C HamanoJul 6, 2016
  3. Jeff KingJul 6, 2016
  4. Junio C HamanoJul 6, 2016

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.