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

Re: [PATCH] t0004: replace test -e with test_path_exists

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 9, 2026, 23:12 UTC
Message-ID
<xmqqpl5c1ttd.fsf@gitster.g>
In-Reply-To
<20260309224739.GA5682@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 30 quoted lines
> Without "-v" you would not see the output either way, like:
>
>   ok 1 # skip some test (missing FOO)
>
> But with it, it is the difference between:
>
>   checking prerequisite: FOO
>   
>   mkdir -p "$TRASH_DIRECTORY/prereq-test-dir-FOO" &&
>   (
>   	cd "$TRASH_DIRECTORY/prereq-test-dir-FOO" &&
>   	test -e foo
>   
>   )
>   prerequisite FOO not satisfied
>   ok 1 # skip some test (missing FOO)
>
> and:
>
>   checking prerequisite: FOO
>   
>   mkdir -p "$TRASH_DIRECTORY/prereq-test-dir-FOO" &&
>   (
>   	cd "$TRASH_DIRECTORY/prereq-test-dir-FOO" &&
>   	test_path_exists foo
>   
>   )
>   Path foo doesn't exist
>   prerequisite FOO not satisfied
>   ok 1 # skip some test (missing FOO)
Sorry, but I am not convinced.

It is as if satisfying FOO is the norm, and not satisifying FOO, i.e., missing path "foo", is something worth reporting about.

If the test reported both success and failure loudly, it may be a different story, though.

> Probably it's pretty obvious for a one-liner like this, but I think it
> would help for a longer block.
>
> -Peff
Previous: Jeff KingNext: PRASHANT S BISHT
Message 4 of 5 in “t0004: replace test -e with test_path_exists”
  1. t0004: replace test -e with test_path_existsPRASHANT S BISHT, Mar 9, 2026
  2. Junio C HamanoMar 9, 2026
  3. Jeff KingMar 9, 2026
  4. Junio C HamanoMar 9, 2026
  5. t4200: convert test -[df] checks to test_path_* helpersPRASHANT S BISHT, Mar 16, 2026

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.