t/t5*: avoid redundant uses of cat

Signed-off-by: Beat Bolli <dev+git@drbeat.li> Acked-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Beat Bolli committed Mar 15, 2024 at 20:46 UTC f636d25dc48d2a1fc2951c098d942fdf190da9f9
3 files changed +3 -3
t/t5100-mailinfo.sh
+1 -1
@@ -70,7 +70,7 @@ test_expect_success 'respect NULs' '
70
71 git mailsplit -d3 -o. "$DATA/nul-plain" &&
72 test_cmp "$DATA/nul-plain" 001 &&
73 - (cat 001 | git mailinfo msg patch) &&
73 + git mailinfo msg patch <001 &&
74 test_line_count = 4 patch
75
76 '
t/t5317-pack-objects-filter-objects.sh
+1 -1
@@ -455,7 +455,7 @@ test_expect_success 'setup r1 - delete loose blobs' '
455 test_parse_ls_files_stage_oids <ls_files_result |
456 sort >expected &&
457
458 - for id in `cat expected | sed "s|..|&/|"`
458 + for id in `sed "s|..|&/|" expected`
459 do
460 rm r1/.git/objects/$id || return 1
461 done
t/t5534-push-signed.sh
+1 -1
@@ -303,7 +303,7 @@ test_expect_success GPGSM 'fail without key and heed user.signingkey x509' '
303 EOF
304 sed -n -e "s/^nonce /NONCE=/p" -e "/^$/q" dst/push-cert
305 ) >expect.in &&
306 - key=$(cat "${GNUPGHOME}/trustlist.txt" | cut -d" " -f1 | tr -d ":") &&
306 + key=$(cut -d" " -f1 <"${GNUPGHOME}/trustlist.txt" | tr -d ":") &&
307 sed -e "s/^KEY=/KEY=${key}/" expect.in >expect &&
308
309 noop=$(git rev-parse noop) &&