{"thread":{"id":"65260","subject":"[PATCH v2] t4200-rerere: use test_path helpers","startedAt":"2026-03-16T07:04:46Z","lastAt":"2026-03-16T07:04:46Z","messageCount":1,"participants":["PRASHANT S BISHT"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"539069","messageId":"20260316070440.79892-1-prashantjee2025@gmail.com","threadId":"65260","inReplyTo":null,"subject":"[PATCH v2] t4200-rerere: use test_path helpers","fromName":"PRASHANT S BISHT","fromEmail":"prashantjee2025@gmail.com","sentAt":"2026-03-16T07:04:40Z","receivedAt":"2026-03-16T07:04:46Z","isPatch":true,"sender":{"key":"prashantjee2025@gmail.com","avatar":"https://avatars.githubusercontent.com/u/213211543?v=4"},"body":"Convert assertion-style test -[df] checks in t4200-rerere.sh to test_path_* helpers.\n\nInstances were found with:\n\n\tgit grep 'test -[def]' t/t4200-rerere.sh\n\nMade-with: Cursor\n---\n t/t4200-rerere.sh | 26 +++++++++++++-------------\n 1 file changed, 13 insertions(+), 13 deletions(-)\n\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex 204325f4d5..1717f407c8 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -72,7 +72,7 @@ test_expect_success 'nothing recorded without rerere' '\n \trm -rf .git/rr-cache &&\n \tgit config rerere.enabled false &&\n \ttest_must_fail git merge first &&\n-\t! test -d .git/rr-cache\n+\ttest_path_is_missing .git/rr-cache\n '\n \n test_expect_success 'activate rerere, old style (conflicting merge)' '\n@@ -84,8 +84,8 @@ test_expect_success 'activate rerere, old style (conflicting merge)' '\n \tsha1=$(sed \"s/\t.*//\" .git/MERGE_RR) &&\n \trr=.git/rr-cache/$sha1 &&\n \tgrep \"^=======\\$\" $rr/preimage &&\n-\t! test -f $rr/postimage &&\n-\t! test -f $rr/thisimage\n+\ttest_path_is_missing $rr/postimage &&\n+\ttest_path_is_missing $rr/thisimage\n '\n \n test_expect_success 'rerere.enabled works, too' '\n@@ -110,8 +110,8 @@ test_expect_success 'set up rr-cache' '\n \n test_expect_success 'rr-cache looks sane' '\n \t# no postimage or thisimage yet\n-\t! test -f $rr/postimage &&\n-\t! test -f $rr/thisimage &&\n+\ttest_path_is_missing $rr/postimage &&\n+\ttest_path_is_missing $rr/thisimage &&\n \n \t# preimage has right number of lines\n \tcnt=$(sed -ne \"/^<<<<<<</,/^>>>>>>>/p\" $rr/preimage | wc -l) &&\n@@ -167,7 +167,7 @@ test_expect_success 'first postimage wins' '\n \tgit show first:a1 | sed \"s/To die: t/To die! T/\" >expect &&\n \n \tgit commit -q -a -m \"prefer first over second\" &&\n-\ttest -f $rr/postimage &&\n+\ttest_path_is_file $rr/postimage &&\n \n \toldmtimepost=$(test-tool chmtime --get -60 $rr/postimage) &&\n \n@@ -190,14 +190,14 @@ test_expect_success 'rerere clear' '\n \tmv $rr/postimage .git/post-saved &&\n \techo \"$sha1\ta1\" | tr \"\\012\" \"\\000\" >.git/MERGE_RR &&\n \tgit rerere clear &&\n-\t! test -d $rr\n+\ttest_path_is_missing $rr\n '\n \n test_expect_success 'leftover directory' '\n \tgit reset --hard &&\n \tmkdir -p $rr &&\n \ttest_must_fail git merge first &&\n-\ttest -f $rr/preimage\n+\ttest_path_is_file $rr/preimage\n '\n \n test_expect_success 'missing preimage' '\n@@ -205,7 +205,7 @@ test_expect_success 'missing preimage' '\n \tmkdir -p $rr &&\n \tcp .git/post-saved $rr/postimage &&\n \ttest_must_fail git merge first &&\n-\ttest -f $rr/preimage\n+\ttest_path_is_file $rr/preimage\n '\n \n test_expect_success 'set up for garbage collection tests' '\n@@ -230,16 +230,16 @@ test_expect_success 'set up for garbage collection tests' '\n \n test_expect_success 'gc preserves young or recently used records' '\n \tgit rerere gc &&\n-\ttest -f $rr/preimage &&\n-\ttest -f $rr2/preimage\n+\ttest_path_is_file $rr/preimage &&\n+\ttest_path_is_file $rr2/preimage\n '\n \n test_expect_success 'old records rest in peace' '\n \ttest-tool chmtime =$just_over_60_days_ago $rr/postimage &&\n \ttest-tool chmtime =$just_over_15_days_ago $rr2/preimage &&\n \tgit rerere gc &&\n-\t! test -f $rr/preimage &&\n-\t! test -f $rr2/preimage\n+\ttest_path_is_missing $rr/preimage &&\n+\ttest_path_is_missing $rr2/preimage\n '\n \n rerere_gc_custom_expiry_test () {\n-- \n2.50.1 (Apple Git-155)\n\n"}]}