{"thread":{"id":"64826","subject":"[PATCH v1] t1005: modernize \"! test -f\" to \"test_path_is_missing\"","startedAt":"2026-01-17T06:26:51Z","lastAt":"2026-01-17T06:26:51Z","messageCount":1,"participants":["Tian Yuchen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"534108","messageId":"20260117062515.319664-1-a3205153416@gmail.com","threadId":"64826","inReplyTo":null,"subject":"[PATCH v1] t1005: modernize \"! test -f\" to \"test_path_is_missing\"","fromName":"Tian Yuchen","fromEmail":"a3205153416@gmail.com","sentAt":"2026-01-17T06:25:15Z","receivedAt":"2026-01-17T06:26:51Z","isPatch":true,"sender":{"key":"cat@malon.dev","avatar":"https://avatars.githubusercontent.com/u/232002048?v=4"},"body":"Replace instances of \"! test -f <file>\" with \"test_path_is_missing <file>\".\nThis macro provides better diagnostics when the test fails (it prints\n\"Path exists:\" instead of silently failing).\n\nSigned-off-by: Tian Yuchen <a3205153416@gmail.com>\n---\n t/t1005-read-tree-reset.sh | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t1005-read-tree-reset.sh b/t/t1005-read-tree-reset.sh\nindex 6b5033d0ce..1bf384dd0f 100755\n--- a/t/t1005-read-tree-reset.sh\n+++ b/t/t1005-read-tree-reset.sh\n@@ -40,7 +40,7 @@ test_expect_success 'reset should remove remnants from a failed merge' '\n \tgit ls-files -s &&\n \tread_tree_u_must_succeed --reset -u HEAD &&\n \tgit ls-files -s >actual &&\n-\t! test -f old &&\n+\ttest_path_is_missing old &&\n \ttest_cmp expect actual\n '\n \n@@ -56,7 +56,7 @@ test_expect_success 'two-way reset should remove remnants too' '\n \tgit ls-files -s &&\n \tread_tree_u_must_succeed --reset -u HEAD HEAD &&\n \tgit ls-files -s >actual &&\n-\t! test -f old &&\n+\ttest_path_is_missing old &&\n \ttest_cmp expect actual\n '\n \n@@ -72,7 +72,7 @@ test_expect_success 'Porcelain reset should remove remnants too' '\n \tgit ls-files -s &&\n \tgit reset --hard &&\n \tgit ls-files -s >actual &&\n-\t! test -f old &&\n+\ttest_path_is_missing old &&\n \ttest_cmp expect actual\n '\n \n@@ -88,7 +88,7 @@ test_expect_success 'Porcelain checkout -f should remove remnants too' '\n \tgit ls-files -s &&\n \tgit checkout -f &&\n \tgit ls-files -s >actual &&\n-\t! test -f old &&\n+\ttest_path_is_missing old &&\n \ttest_cmp expect actual\n '\n \n@@ -104,7 +104,7 @@ test_expect_success 'Porcelain checkout -f HEAD should remove remnants too' '\n \tgit ls-files -s &&\n \tgit checkout -f HEAD &&\n \tgit ls-files -s >actual &&\n-\t! test -f old &&\n+\ttest_path_is_missing old &&\n \ttest_cmp expect actual\n '\n \n\nbase-commit: 7264e61d87e58b9d0f5e6424c47c11e9657dfb75\n-- \n2.43.0\n\n"}]}