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 <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Denton Liu committed Aug 27, 2019 at 00:05 UTC 92014b69bb1aa781605295e0e0d3d886368bb7a3
1 file changed +31 -31
t/t4014-format-patch.sh
+31 -31
@@ -126,8 +126,8 @@ test_expect_success 'extra headers' '
126 " &&
127 git config --add format.headers "Cc: S E Cipient <scipient@example.com>
128 " &&
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 &&
131 grep "^To: R E Cipient <rcipient@example.com>\$" hdrs2 &&
132 grep "^Cc: S E Cipient <scipient@example.com>\$" hdrs2
133 '
@@ -136,7 +136,7 @@ test_expect_success 'extra headers without newlines' '
136 git config --replace-all format.headers "To: R E Cipient <rcipient@example.com>" &&
137 git config --add format.headers "Cc: S E Cipient <scipient@example.com>" &&
138 git format-patch --stdout master..side >patch3 &&
139 - sed -e "/^\$/q" patch3 > hdrs3 &&
139 + sed -e "/^\$/q" patch3 >hdrs3 &&
140 grep "^To: R E Cipient <rcipient@example.com>\$" hdrs3 &&
141 grep "^Cc: S E Cipient <scipient@example.com>\$" hdrs3
142 '
@@ -144,8 +144,8 @@ test_expect_success 'extra headers without newlines' '
144 test_expect_success 'extra headers with multiple To:s' '
145 git config --replace-all format.headers "To: R E Cipient <rcipient@example.com>" &&
146 git config --add format.headers "To: S E Cipient <scipient@example.com>" &&
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 &&
149 grep "^To: R E Cipient <rcipient@example.com>,\$" hdrs4 &&
150 grep "^ *S E Cipient <scipient@example.com>\$" hdrs4
151 '
@@ -318,7 +318,7 @@ test_expect_success 'reroll count (-v)' '
318 check_threading () {
319 expect="$1" &&
320 shift &&
321 - (git format-patch --stdout "$@"; echo $? > status.out) |
321 + (git format-patch --stdout "$@"; echo $? >status.out) |
322 # Prints everything between the Message-ID and In-Reply-To,
323 # and replaces all Message-ID-lookalikes by a sequence number
324 perl -ne '
@@ -333,12 +333,12 @@ check_threading () {
333 print;
334 }
335 print "---\n" if /^From /i;
336 - ' > actual &&
336 + ' >actual &&
337 test 0 = "$(cat status.out)" &&
338 test_cmp "$expect" actual
339 }
340
341 -cat >> expect.no-threading <<EOF
341 +cat >>expect.no-threading <<EOF
342 ---
343 ---
344 ---
@@ -349,7 +349,7 @@ test_expect_success 'no threading' '
349 check_threading expect.no-threading master
350 '
351
352 -cat > expect.thread <<EOF
352 +cat >expect.thread <<EOF
353 ---
354 Message-Id: <0>
355 ---
@@ -366,7 +366,7 @@ test_expect_success 'thread' '
366 check_threading expect.thread --thread master
367 '
368
369 -cat > expect.in-reply-to <<EOF
369 +cat >expect.in-reply-to <<EOF
370 ---
371 Message-Id: <0>
372 In-Reply-To: <1>
@@ -386,7 +386,7 @@ test_expect_success 'thread in-reply-to' '
386 --thread master
387 '
388
389 -cat > expect.cover-letter <<EOF
389 +cat >expect.cover-letter <<EOF
390 ---
391 Message-Id: <0>
392 ---
@@ -407,7 +407,7 @@ test_expect_success 'thread cover-letter' '
407 check_threading expect.cover-letter --cover-letter --thread master
408 '
409
410 -cat > expect.cl-irt <<EOF
410 +cat >expect.cl-irt <<EOF
411 ---
412 Message-Id: <0>
413 In-Reply-To: <1>
@@ -439,7 +439,7 @@ test_expect_success 'thread explicit shallow' '
439 --in-reply-to="<test.message>" --thread=shallow master
440 '
441
442 -cat > expect.deep <<EOF
442 +cat >expect.deep <<EOF
443 ---
444 Message-Id: <0>
445 ---
@@ -457,7 +457,7 @@ test_expect_success 'thread deep' '
457 check_threading expect.deep --thread=deep master
458 '
459
460 -cat > expect.deep-irt <<EOF
460 +cat >expect.deep-irt <<EOF
461 ---
462 Message-Id: <0>
463 In-Reply-To: <1>
@@ -480,7 +480,7 @@ test_expect_success 'thread deep in-reply-to' '
480 --in-reply-to="<test.message>" master
481 '
482
483 -cat > expect.deep-cl <<EOF
483 +cat >expect.deep-cl <<EOF
484 ---
485 Message-Id: <0>
486 ---
@@ -504,7 +504,7 @@ test_expect_success 'thread deep cover-letter' '
504 check_threading expect.deep-cl --cover-letter --thread=deep master
505 '
506
507 -cat > expect.deep-cl-irt <<EOF
507 +cat >expect.deep-cl-irt <<EOF
508 ---
509 Message-Id: <0>
510 In-Reply-To: <1>
@@ -584,7 +584,7 @@ test_expect_success 'cover-letter inherits diff options' '
584 grep "file => foo .* 0 *\$" 0000-cover-letter.patch
585 '
586
587 -cat > expect << EOF
587 +cat >expect <<EOF
588 This is an excessively long subject line for a message due to the
589 habit some projects have of not having a short, one-line subject at
590 the start of the commit message, but rather sticking a whole
@@ -596,11 +596,11 @@ EOF
596
597 test_expect_success 'shortlog of cover-letter wraps overly-long onelines' '
598 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 &&
600 test_cmp expect output
601 '
602
603 -cat > expect << EOF
603 +cat >expect <<EOF
604 index $before..$after 100644
605 --- a/file
606 +++ b/file
@@ -620,7 +620,7 @@ test_expect_success 'format-patch respects -U' '
620 test_cmp expect output
621 '
622
623 -cat > expect << EOF
623 +cat >expect <<EOF
624
625 diff --git a/file b/file
626 index $before..$after 100644
@@ -635,7 +635,7 @@ EOF
635
636 test_expect_success 'format-patch -p suppresses stat' '
637 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 &&
639 test_cmp expect output
640 '
641
@@ -689,7 +689,7 @@ test_expect_success 'format-patch from a subdirectory (3)' '
689 '
690
691 test_expect_success 'format-patch --in-reply-to' '
692 - git format-patch -1 --stdout --in-reply-to "baz@foo.bar" > patch8 &&
692 + git format-patch -1 --stdout --in-reply-to "baz@foo.bar" >patch8 &&
693 grep "^In-Reply-To: <baz@foo.bar>" patch8 &&
694 grep "^References: <baz@foo.bar>" patch8
695 '
@@ -780,21 +780,21 @@ test_expect_success 'format-patch with multiple notes refs' '
780 ! grep "this is note 2" out
781 '
782
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
786
787 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 &&
789 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 &&
791 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 &&
793 test_i18ncmp expect.check output
794 '
795
796 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 &&
798 test 5 = $(grep "^diff --git a/" output | wc -l)
799 '
800
@@ -1610,14 +1610,14 @@ test_expect_success 'format-patch --base' '
1610 echo "base-commit: $(git rev-parse HEAD~3)" >>expect &&
1611 echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --stable | awk "{print \$1}")" >>expect &&
1612 echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --stable | awk "{print \$1}")" >>expect &&
1613 - signature >> expect &&
1613 + signature >>expect &&
1614 test_cmp expect actual1 &&
1615 test_cmp expect actual2 &&
1616 echo >fail &&
1617 echo "base-commit: $(git rev-parse HEAD~3)" >>fail &&
1618 echo "prerequisite-patch-id: $(git show --patch HEAD~2 | git patch-id --unstable | awk "{print \$1}")" >>fail &&
1619 echo "prerequisite-patch-id: $(git show --patch HEAD~1 | git patch-id --unstable | awk "{print \$1}")" >>fail &&
1620 - signature >> fail &&
1620 + signature >>fail &&
1621 ! test_cmp fail actual1 &&
1622 ! test_cmp fail actual2
1623 '