Skip to content

Commit 92014b6

Browse files
Denton-Lgitster
authored andcommitted
t4014: remove spaces after redirect operators
For shell scripts, the usual convention is for there to be no space after redirection operators, (e.g. `>file`, not `> file`). Remove these spaces wherever they appear. Signed-off-by: Denton Liu <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0ab74e9 commit 92014b6

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

t/t4014-format-patch.sh

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ test_expect_success 'extra headers' '
126126
" &&
127127
git config --add format.headers "Cc: S E Cipient <[email protected]>
128128
" &&
129-
git format-patch --stdout master..side > patch2 &&
130-
sed -e "/^\$/q" patch2 > hdrs2 &&
129+
git format-patch --stdout master..side >patch2 &&
130+
sed -e "/^\$/q" patch2 >hdrs2 &&
131131
grep "^To: R E Cipient <[email protected]>\$" hdrs2 &&
132132
grep "^Cc: S E Cipient <[email protected]>\$" hdrs2
133133
'
@@ -136,16 +136,16 @@ test_expect_success 'extra headers without newlines' '
136136
git config --replace-all format.headers "To: R E Cipient <[email protected]>" &&
137137
git config --add format.headers "Cc: S E Cipient <[email protected]>" &&
138138
git format-patch --stdout master..side >patch3 &&
139-
sed -e "/^\$/q" patch3 > hdrs3 &&
139+
sed -e "/^\$/q" patch3 >hdrs3 &&
140140
grep "^To: R E Cipient <[email protected]>\$" hdrs3 &&
141141
grep "^Cc: S E Cipient <[email protected]>\$" hdrs3
142142
'
143143

144144
test_expect_success 'extra headers with multiple To:s' '
145145
git config --replace-all format.headers "To: R E Cipient <[email protected]>" &&
146146
git config --add format.headers "To: S E Cipient <[email protected]>" &&
147-
git format-patch --stdout master..side > patch4 &&
148-
sed -e "/^\$/q" patch4 > hdrs4 &&
147+
git format-patch --stdout master..side >patch4 &&
148+
sed -e "/^\$/q" patch4 >hdrs4 &&
149149
grep "^To: R E Cipient <[email protected]>,\$" hdrs4 &&
150150
grep "^ *S E Cipient <[email protected]>\$" hdrs4
151151
'
@@ -318,7 +318,7 @@ test_expect_success 'reroll count (-v)' '
318318
check_threading () {
319319
expect="$1" &&
320320
shift &&
321-
(git format-patch --stdout "$@"; echo $? > status.out) |
321+
(git format-patch --stdout "$@"; echo $? >status.out) |
322322
# Prints everything between the Message-ID and In-Reply-To,
323323
# and replaces all Message-ID-lookalikes by a sequence number
324324
perl -ne '
@@ -333,12 +333,12 @@ check_threading () {
333333
print;
334334
}
335335
print "---\n" if /^From /i;
336-
' > actual &&
336+
' >actual &&
337337
test 0 = "$(cat status.out)" &&
338338
test_cmp "$expect" actual
339339
}
340340

341-
cat >> expect.no-threading <<EOF
341+
cat >>expect.no-threading <<EOF
342342
---
343343
---
344344
---
@@ -349,7 +349,7 @@ test_expect_success 'no threading' '
349349
check_threading expect.no-threading master
350350
'
351351

352-
cat > expect.thread <<EOF
352+
cat >expect.thread <<EOF
353353
---
354354
Message-Id: <0>
355355
---
@@ -366,7 +366,7 @@ test_expect_success 'thread' '
366366
check_threading expect.thread --thread master
367367
'
368368

369-
cat > expect.in-reply-to <<EOF
369+
cat >expect.in-reply-to <<EOF
370370
---
371371
Message-Id: <0>
372372
In-Reply-To: <1>
@@ -386,7 +386,7 @@ test_expect_success 'thread in-reply-to' '
386386
--thread master
387387
'
388388

389-
cat > expect.cover-letter <<EOF
389+
cat >expect.cover-letter <<EOF
390390
---
391391
Message-Id: <0>
392392
---
@@ -407,7 +407,7 @@ test_expect_success 'thread cover-letter' '
407407
check_threading expect.cover-letter --cover-letter --thread master
408408
'
409409

410-
cat > expect.cl-irt <<EOF
410+
cat >expect.cl-irt <<EOF
411411
---
412412
Message-Id: <0>
413413
In-Reply-To: <1>
@@ -439,7 +439,7 @@ test_expect_success 'thread explicit shallow' '
439439
--in-reply-to="<test.message>" --thread=shallow master
440440
'
441441

442-
cat > expect.deep <<EOF
442+
cat >expect.deep <<EOF
443443
---
444444
Message-Id: <0>
445445
---
@@ -457,7 +457,7 @@ test_expect_success 'thread deep' '
457457
check_threading expect.deep --thread=deep master
458458
'
459459

460-
cat > expect.deep-irt <<EOF
460+
cat >expect.deep-irt <<EOF
461461
---
462462
Message-Id: <0>
463463
In-Reply-To: <1>
@@ -480,7 +480,7 @@ test_expect_success 'thread deep in-reply-to' '
480480
--in-reply-to="<test.message>" master
481481
'
482482

483-
cat > expect.deep-cl <<EOF
483+
cat >expect.deep-cl <<EOF
484484
---
485485
Message-Id: <0>
486486
---
@@ -504,7 +504,7 @@ test_expect_success 'thread deep cover-letter' '
504504
check_threading expect.deep-cl --cover-letter --thread=deep master
505505
'
506506

507-
cat > expect.deep-cl-irt <<EOF
507+
cat >expect.deep-cl-irt <<EOF
508508
---
509509
Message-Id: <0>
510510
In-Reply-To: <1>
@@ -584,7 +584,7 @@ test_expect_success 'cover-letter inherits diff options' '
584584
grep "file => foo .* 0 *\$" 0000-cover-letter.patch
585585
'
586586

587-
cat > expect << EOF
587+
cat >expect <<EOF
588588
This is an excessively long subject line for a message due to the
589589
habit some projects have of not having a short, one-line subject at
590590
the start of the commit message, but rather sticking a whole
@@ -596,11 +596,11 @@ EOF
596596

597597
test_expect_success 'shortlog of cover-letter wraps overly-long onelines' '
598598
git format-patch --cover-letter -2 &&
599-
sed -e "1,/A U Thor/d" -e "/^\$/q" < 0000-cover-letter.patch > output &&
599+
sed -e "1,/A U Thor/d" -e "/^\$/q" <0000-cover-letter.patch >output &&
600600
test_cmp expect output
601601
'
602602

603-
cat > expect << EOF
603+
cat >expect <<EOF
604604
index $before..$after 100644
605605
--- a/file
606606
+++ b/file
@@ -620,7 +620,7 @@ test_expect_success 'format-patch respects -U' '
620620
test_cmp expect output
621621
'
622622

623-
cat > expect << EOF
623+
cat >expect <<EOF
624624
625625
diff --git a/file b/file
626626
index $before..$after 100644
@@ -635,7 +635,7 @@ EOF
635635

636636
test_expect_success 'format-patch -p suppresses stat' '
637637
git format-patch -p -2 &&
638-
sed -e "1,/^\$/d" -e "/^+5/q" < 0001-This-is-an-excessively-long-subject-line-for-a-messa.patch > output &&
638+
sed -e "1,/^\$/d" -e "/^+5/q" <0001-This-is-an-excessively-long-subject-line-for-a-messa.patch >output &&
639639
test_cmp expect output
640640
'
641641

@@ -689,7 +689,7 @@ test_expect_success 'format-patch from a subdirectory (3)' '
689689
'
690690

691691
test_expect_success 'format-patch --in-reply-to' '
692-
git format-patch -1 --stdout --in-reply-to "[email protected]" > patch8 &&
692+
git format-patch -1 --stdout --in-reply-to "[email protected]" >patch8 &&
693693
grep "^In-Reply-To: <[email protected]>" patch8 &&
694694
grep "^References: <[email protected]>" patch8
695695
'
@@ -780,21 +780,21 @@ test_expect_success 'format-patch with multiple notes refs' '
780780
! grep "this is note 2" out
781781
'
782782

783-
echo "fatal: --name-only does not make sense" > expect.name-only
784-
echo "fatal: --name-status does not make sense" > expect.name-status
785-
echo "fatal: --check does not make sense" > expect.check
783+
echo "fatal: --name-only does not make sense" >expect.name-only
784+
echo "fatal: --name-status does not make sense" >expect.name-status
785+
echo "fatal: --check does not make sense" >expect.check
786786

787787
test_expect_success 'options no longer allowed for format-patch' '
788-
test_must_fail git format-patch --name-only 2> output &&
788+
test_must_fail git format-patch --name-only 2>output &&
789789
test_i18ncmp expect.name-only output &&
790-
test_must_fail git format-patch --name-status 2> output &&
790+
test_must_fail git format-patch --name-status 2>output &&
791791
test_i18ncmp expect.name-status output &&
792-
test_must_fail git format-patch --check 2> output &&
792+
test_must_fail git format-patch --check 2>output &&
793793
test_i18ncmp expect.check output
794794
'
795795

796796
test_expect_success 'format-patch --numstat should produce a patch' '
797-
git format-patch --numstat --stdout master..side > output &&
797+
git format-patch --numstat --stdout master..side >output &&
798798
test 5 = $(grep "^diff --git a/" output | wc -l)
799799
'
800800

@@ -1610,14 +1610,14 @@ test_expect_success 'format-patch --base' '
16101610
echo "base-commit: $(git rev-parse HEAD~3)" >>expect &&
16111611
echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expect &&
16121612
echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expect &&
1613-
signature >> expect &&
1613+
signature >>expect &&
16141614
test_cmp expect actual1 &&
16151615
test_cmp expect actual2 &&
16161616
echo >fail &&
16171617
echo "base-commit: $(git rev-parse HEAD~3)" >>fail &&
16181618
echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --unstable | awk "{print \$1}")" >>fail &&
16191619
echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --unstable | awk "{print \$1}")" >>fail &&
1620-
signature >> fail &&
1620+
signature >>fail &&
16211621
! test_cmp fail actual1 &&
16221622
! test_cmp fail actual2
16231623
'

0 commit comments

Comments
 (0)