Skip to content

Commit 2b5a303

Browse files
Beat Bolligitster
authored andcommitted
t/t3*: avoid redundant uses of cat
Signed-off-by: Beat Bolli <[email protected]> Acked-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2ed139c commit 2b5a303

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

t/t3200-branch.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ EOF
576576
577577
# ...and that the comments for those sections are also
578578
# preserved.
579-
cat config.branch | sed "s/\"source\"/\"dest\"/" >expect &&
579+
sed "s/\"source\"/\"dest\"/" config.branch >expect &&
580580
sed -n -e "/Note the lack/,\$p" .git/config >actual &&
581581
test_cmp expect actual
582582
'

t/t3321-notes-stripspace.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ test_expect_success 'add note by specifying "-C", "--no-stripspace" is the defau
442442
${LF}
443443
EOF
444444
445-
cat expect | git hash-object -w --stdin >blob &&
445+
git hash-object -w --stdin <expect >blob &&
446446
git notes add -C $(cat blob) &&
447447
git notes show >actual &&
448448
test_cmp expect actual &&
@@ -468,7 +468,7 @@ test_expect_success 'reuse note by specifying "-C" and "--stripspace"' '
468468
second-line
469469
EOF
470470
471-
cat data | git hash-object -w --stdin >blob &&
471+
git hash-object -w --stdin <data >blob &&
472472
git notes add --stripspace -C $(cat blob) &&
473473
git notes show >actual &&
474474
test_cmp expect actual
@@ -492,7 +492,7 @@ test_expect_success 'reuse with "-C" and add note with "-m", "-m" will stripspac
492492
third-line
493493
EOF
494494
495-
cat data | git hash-object -w --stdin >blob &&
495+
git hash-object -w --stdin <data >blob &&
496496
git notes add -C $(cat blob) -m "third-line" &&
497497
git notes show >actual &&
498498
test_cmp expect actual
@@ -511,7 +511,7 @@ test_expect_success 'add note with "-m" and reuse note with "-C", "-C" will not
511511
second-line
512512
EOF
513513
514-
cat data | git hash-object -w --stdin >blob &&
514+
git hash-object -w --stdin <data >blob &&
515515
git notes add -m "first-line" -C $(cat blob) &&
516516
git notes show >actual &&
517517
test_cmp expect actual

t/t3920-crlf-messages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ LIB_CRLF_BRANCHES=""
1010
create_crlf_ref () {
1111
branch="$1" &&
1212
cat >.crlf-orig-$branch.txt &&
13-
cat .crlf-orig-$branch.txt | append_cr >.crlf-message-$branch.txt &&
13+
append_cr <.crlf-orig-$branch.txt >.crlf-message-$branch.txt &&
1414
grep 'Subject' .crlf-orig-$branch.txt | tr '\n' ' ' | sed 's/[ ]*$//' | tr -d '\n' >.crlf-subject-$branch.txt &&
1515
grep 'Body' .crlf-orig-$branch.txt | append_cr >.crlf-body-$branch.txt &&
1616
LIB_CRLF_BRANCHES="${LIB_CRLF_BRANCHES} ${branch}" &&

0 commit comments

Comments
 (0)