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

Re: [PATCH 1/1] t5401: prefer test_path_is_* helper function

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 2, 2025, 23:43 UTC
Message-ID
<xmqqjza73oax.fsf@gitster.g>
In-Reply-To
<20250201071210.30509-1-amch9605@gmail.com>
ambar chakravartty <amch9605@gmail.com> writes:
Show 7 quoted lines
> From: ambar chakravartty <chakravarttyambar@gmail.com>
>
>     test -f does not provide a nice error message when we hit test
>     failures, so use test_path_is_file instead
>
> Signed-off-by: ambar chakravartty <amch9605@gmail.com>
> ---

Much better. You do not have to and you should not indent the proposed log message, and you want the full-stop (.) at the end of the word "instead" at the end of the sentence, but other than that this looks very good.

Will queue after tweaking the log message.
Thanks.
Show 30 quoted lines
>  t/t5401-update-hooks.sh | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/t/t5401-update-hooks.sh b/t/t5401-update-hooks.sh
> index 723d1e17ec..17a46fd3ba 100755
> --- a/t/t5401-update-hooks.sh
> +++ b/t/t5401-update-hooks.sh
> @@ -64,14 +64,14 @@ test_expect_success 'updated as expected' '
>  '
>  
>  test_expect_success 'hooks ran' '
> -	test -f victim.git/pre-receive.args &&
> -	test -f victim.git/pre-receive.stdin &&
> -	test -f victim.git/update.args &&
> -	test -f victim.git/update.stdin &&
> -	test -f victim.git/post-receive.args &&
> -	test -f victim.git/post-receive.stdin &&
> -	test -f victim.git/post-update.args &&
> -	test -f victim.git/post-update.stdin
> +	test_path_is_file victim.git/pre-receive.args &&
> +	test_path_is_file victim.git/pre-receive.stdin &&
> +	test_path_is_file victim.git/update.args &&
> +	test_path_is_file victim.git/update.stdin &&
> +	test_path_is_file victim.git/post-receive.args &&
> +	test_path_is_file victim.git/post-receive.stdin &&
> +	test_path_is_file victim.git/post-update.args &&
> +	test_path_is_file victim.git/post-update.stdin
>  '
>  
>  test_expect_success 'pre-receive hook input' '
Previous: ambar
Message 4 of 4 in “t5401: prefer test_path_is_* helper function”
  1. 1/1 t5401: prefer test_path_is_* helper functionambar chakravartty, Feb 1, 2025
  2. Meet SoniFeb 1, 2025
  3. ambarFeb 1, 2025
  4. Junio C HamanoFeb 2, 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.