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

Re: [GSOC] [PATCH] replace test -f with test_path_is_file

From
Matheus Tavares Bernardino <matheus.bernardino@usp.br>
Date
Mar 11, 2020, 19:29 UTC
Message-ID
<CAHd-oW6K8Gh=un9znbNzm2rNvvL5s8j0uft8owNADkzjRL8jBg@mail.gmail.com>
In-Reply-To
<20200311180625.4643-1-shubhunic@gmail.com>
Hi, Shubham. Welcome to the community!
On Wed, Mar 11, 2020 at 3:06 PM Shubham Verma <shubhunic@gmail.com> wrote:
>
> Subject: [GSOC] [PATCH] replace test -f with test_path_is_file

It's common to prefix the patch title with "area: ", where "area" corresponds to the codebase section which the patch is modifying. This makes it easier to understand the scope of the change. You can check what others have been using for this specific file with `git log --no-merges t/t9801-git-p4-branch.sh`. In this case, I think a better alternative would be: "t9801: replace test -f with test_path_is_file"

> Although `test -f` has the same functionality as test_path_is_file(), in the case where test_path_is_file() fails, we get much better
> debugging information.
>
> Replace `test -f` with test_path_is_file() so that future developers will have a better experience debugging these test cases.

It's also a good practice to wrap the commit body in 72 columns. This will, for example, help viewing the message in most terminals. And, please, add your Signed-off-by[1] in the footer of the message.

[1]: https://github.com/git/git/blob/master/Documentation/SubmittingPatches#L299
> ---
>  t/t9801-git-p4-branch.sh | 38 +++++++++++++++++++-------------------
>  1 file changed, 19 insertions(+), 19 deletions(-)
As for the changes, LGTM :)
Previous: Shubham Verma
Message 2 of 2 in “replace test -f with test_path_is_file”
  1. Shubham VermaMar 11, 2020
  2. Matheus Tavares BernardinoMar 11, 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.