aboutsummaryrefslogtreecommitdiff
path: root/packfile.c
diff options
context:
space:
mode:
authorSiddharth Shrimali <r.siddharth.shrimali@gmail.com>2026-04-01 11:50:29 +0530
committerJunio C Hamano <gitster@pobox.com>2026-04-01 11:45:25 -0700
commit42148dafdf74f8458e7a710dcb982c0be0e40566 (patch)
tree11ee25e1227ed1b4ad819db1b514cb145bc25bf7 /packfile.c
parentcf2139f8e1680b076e115bc0b349e369b4b0ecc4 (diff)
downloadgit-42148dafdf74f8458e7a710dcb982c0be0e40566.tar.xz
t7004: replace wc -l with modern test helpers
Pipelines of the form "test $(git tag | wc -l) -eq 0" suppress git's exit code. This means a crash or unexpected failure from git tag would go undetected. Additionally, the use of $(...) creates a subshell for each check, which adds unnecessary overhead. Replace these patterns with test_must_be_empty and test_line_count. These helpers check the output of git directly from a file, ensuring git's exit code is captured properly via the preceding "&&" chain. They also provide better diagnostics on failure by printing the contents of the file when a check does not pass. Signed-off-by: Siddharth Shrimali <r.siddharth.shrimali@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'packfile.c')
0 files changed, 0 insertions, 0 deletions