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

Re: [PATCH v3] t7611: replace test -f with test_path_is* helpers

From
Ghanshyam Thakkar <shyamthakkar001@gmail.com>
Date
Dec 27, 2024, 12:19 UTC
Message-ID
<D6MH7E17E6I0.3IG5103E7XXP3@gmail.com>
In-Reply-To
<20241227105345.10184-1-meetsoni3017@gmail.com>
On Fri Dec 27, 2024 at 4:23 PM IST, Meet Soni wrote:
Show 11 quoted lines
> Replace `test -f` and `test ! -f` with `test_path_is_file` and
> `test_path_is_missing` for better debuggability.
>
> While `test -f` ensures that the file exists and is a regular file,
> `test_path_is_file` provides clearer error messages on failure. On the
> other hand, `test ! -f`, used to check either the absence of a regular
> file or the presence of any other filesystem object, but looking at
> them in the test individually, all of them should've said `test ! e`,
> i.e. "there shouldn't be anything at given path on filesystem."
> Replaced these cases with `test_path_is_missing` for better
> debuggability.
'Replaced' -> 'Replace'. Cf. https://git-scm.com/docs/SubmittingPatches#imperative-mood
Other than that, this LGTM.
Thanks.
Previous: Meet SoniNext: Junio C Hamano
Message 6 of 7 in “t7611: replace test -f with test_path_is* helpers”
  1. Meet SoniDec 18, 2024
  2. karthik nayakDec 18, 2024
  3. t7611: replace test -f with test_path_is* helpersMeet Soni, Dec 20, 2024
  4. Junio C HamanoDec 20, 2024
  5. t7611: replace test -f with test_path_is* helpersMeet Soni, Dec 27, 2024
  6. Ghanshyam ThakkarDec 27, 2024
  7. Junio C HamanoDec 27, 2024

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.