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

Re: [PATCH] t0200: replace 'test -d' with 'test_path_is_dir' and 'test -f' with 'test_path_is_file'

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 3, 2025, 06:16 UTC
Message-ID
<aD6TJLuuaZmiFUvZ@pks.im>
In-Reply-To
<20250603053137.66249-1-derick.william.moraes@gmail.com>
On Tue, Jun 03, 2025 at 02:20:28AM -0300, Derick W. de M. Frias wrote:
> From: DerickWMFrias <derick.william.moraes@gmail.com>

There is a mismatch between your name here (which would be applied as the patch author) and the Signed-off-by. These two should match.

> 'test_path_is_file' and 'test_path_is_dir' are modern path checking
> methods in Git's development.

We typically want to provide enough context in commit messages to state _why_ the replacement is better. Them being more "modern" isn't yet a sufficiently good reason. So it would be great if we explicitly mention what the replacements bring to the table in a sentence or two.

> This patch replaces old 'test -d' and 'test -f' methods with them.

We use imperative style for commit messages, as if instructing the code to change. So instead of saying "This patch replaces", we'd say "Replace `test -d` and `test -f` ...".

The patch itself looks obviously good to me, thanks!
Patrick
Previous: Derick W. de M. FriasNext: Derick W. de M. Frias
Message 2 of 3 in “t0200: replace 'test -d' with 'test_path_is_dir' and 'test -f' with 'test_path_is_file'”
  1. t0200: replace 'test -d' with 'test_path_is_dir' and 'test -f' with 'test_path_is_file'Derick W. de M. Frias, Jun 3, 2025
  2. Patrick SteinhardtJun 3, 2025
  3. t0200: replace 'test -d' with 'test_path_is_dir' and 'test -f' with 'test_path_is_file'Derick W. de M. Frias, Jun 18, 2025

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.