From: Siddharth Shrimali Date: Tue, 21 Apr 2026 05:33:31 GMT Subject: [PATCH v2 0/3] t7004: cleanup and modernize brittle tests Message-ID: <20260421053334.5414-1-r.siddharth.shrimali@gmail.com> In-Reply-To: <20260414141828.27576-1-r.siddharth.shrimali@gmail.com> This patch series addresses brittle testing patterns in t7004-tag.sh. In this second version, the first patch has been updated to follow Junio's "belt-and-suspenders" suggestion. Instead of simply removing the tag count check, it now uses 'test_cmp' to verify that the repository state remains unchanged after failed tag creation attempts. This maintains verification while removing the reliance on a hardcoded global tag count. Subsequent patches continue to modernize the script by removing hardcoded global state and replacing subshell patterns that could otherwise suppress Git exit codes, ensuring that crashes (like segmentation faults) are properly detected. Thanks to Patrick and Junio for the feedback on v1 regarding state verification. --- Changes since v1: - Updated patch 1 to use 'test_cmp' for state verification instead of just dropping the count check. Siddharth Shrimali (3): t7004: drop hardcoded tag count for state verification t7004: dynamically grab expected state in tests t7004: avoid subshells to capture git exit codes t/t7004-tag.sh | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) -- 2.51.2