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

Re: [GSoC PATCH] t5402: use test_path_* helpers instead of test -e and test -f

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 29, 2026, 20:32 UTC
Message-ID
<xmqqcxss1c4v.fsf@gitster.g>
In-Reply-To
<DMHLKVCPT29F.1JXB7BAOXBPYT@fastmail.com>
"Mark C. Chu-Carroll" <markchucarroll@fastmail.com> writes:
Show 18 quoted lines
> On Thu Oct 29, 2026 at 4:00 PM EDT, Tilak Kumar wrote:
>> Use test_path_exists and test_path_is_missing instead of "test -e"
>> and "! test -f" in the post-merge hook tests, so that a failure
>> reports which path was unexpectedly missing or present instead of
>> failing silently.
>>
>> Signed-off-by: Tilak Kumar <raaztilak07@gmail.com>
>> ...
>>  
>>  test_expect_success 'post-merge from squash merge runs as expected ' '
>>  	GIT_DIR=clone2/.git git merge --squash $commit1 &&
>> -	test -e clone2/.git/post-merge.args
>> +	test_path_exists clone2/.git/post-merge.args
>>  '
>>  
>>  test_expect_success 'post-merge from squash merge receives the right argument ' '
>
> looks correct to me.
Thanks for writing and reviewing.  Queued.
Previous: Mark C. Chu-Carroll
Message 3 of 3 in “t5402: use test_path_* helpers instead of test -e and test -f”
  1. t5402: use test_path_* helpers instead of test -e and test -fTilak Kumar, Oct 29, 2026
  2. Mark C. Chu-CarrollOct 29, 2026
  3. Junio C HamanoOct 29, 2026

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.