{"thread":{"id":"65104","subject":"[PATCH] t/perf/p5304: catch git count-objects failures","startedAt":"2026-03-01T02:23:21Z","lastAt":"2026-03-01T02:23:21Z","messageCount":1,"participants":["Santhosh"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"537421","messageId":"20260301022253.129736-1-santhoshprogrammer07@gmail.com","threadId":"65104","inReplyTo":null,"subject":"[PATCH] t/perf/p5304: catch git count-objects failures","fromName":"Santhosh","fromEmail":"santhoshprogrammer07@gmail.com","sentAt":"2026-03-01T02:22:53Z","receivedAt":"2026-03-01T02:23:21Z","isPatch":true,"sender":{"key":"santhoshprogrammer07@gmail.com","avatar":null},"body":"Piping `git count-objects` into `grep` masks the exit code of the\ngit command. If `count-objects` fails but `grep` succeeds, the\npipeline reports success, potentially hiding bugs.\n\nWrite the output to a temporary file instead to ensure the exit\ncode of the git command is properly evaluated.\n\nSigned-off-by: Santhosh <santhoshprogrammer07@gmail.com>\n---\n t/perf/p5304-prune.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/perf/p5304-prune.sh b/t/perf/p5304-prune.sh\nindex 83baedb8a4..af59424de8 100755\n--- a/t/perf/p5304-prune.sh\n+++ b/t/perf/p5304-prune.sh\n@@ -14,7 +14,7 @@ test_expect_success 'remove unreachable loose objects' '\n '\n \n test_expect_success 'confirm there are no loose objects' '\n-\tgit count-objects | grep ^0\n+\tgit count-objects >out && grep ^0 out\n '\n \n test_perf 'prune with no objects' '\n-- \n2.43.0\n\n"}]}