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

Re: [GSoC][PATCH 1/1] t1050: clean up checks for file existence

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 22, 2020, 17:50 UTC
Message-ID
<xmqqo8tq5x5t.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20200222071335.27292-2-wasmus@zom.bi>
Rasmus Jonsson <wasmus@zom.bi> writes:
> Replace "test -f" with test_path_is_file, which gives more verbose
> and accurate output.

Does it? "test -f" is designed to be silent, while the helper function is designed to be verbose to help debugging the tests, but the accuracy of the latter simply rests on the former.

Also
> Subject: Re: [GSoC][PATCH 1/1] t1050: clean up checks for file existence

"test -f <path>" is not unclean. It just is that it is less helpful than using test_path_is_file.

	Subject: [PATCH] t1050: use test_path_is_file instead of "test -f"
	Use test_path_is_file instead of "test -f"; this will help
	when running the test with the "-v" option for debugging.
> Signed-off-by: Rasmus Jonsson <wasmus@zom.bi>
Previous: brian m. carlsonNext: Jeff King
Message 5 of 7 in “Introduction & microproject”
  1. Rasmus JonssonFeb 22, 2020
  2. [GSoC][PATCH 1/1] t1050: clean up checks for file existenceRasmus Jonsson, Feb 22, 2020
  3. Junio C HamanoFeb 22, 2020
  4. brian m. carlsonFeb 22, 2020
  5. Junio C HamanoFeb 22, 2020
  6. Jeff KingFeb 24, 2020
  7. [GSoC][PATCH v2] t1050: replace test -f with test_path_is_fileRasmus Jonsson, Feb 23, 2020

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.