The convention is to use indentable here-docs within test cases so that
the here-docs line up with the rest of the code within the test case.
Change here-docs from `<<\EOF` to `<<-\EOF` so that they can be indented
along with the rest of the test case.

Signed-off-by: Denton Liu <liu.den...@gmail.com>
---
 t/t4014-format-patch.sh | 368 ++++++++++++++++++++--------------------
 1 file changed, 184 insertions(+), 184 deletions(-)

diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
index 075affb1e5..c07d868491 100755
--- a/t/t4014-format-patch.sh
+++ b/t/t4014-format-patch.sh
@@ -1211,282 +1211,282 @@ append_signoff()
 
 test_expect_success 'signoff: commit with no body' '
        append_signoff </dev/null >actual &&
-       cat <<\EOF | sed "s/EOL$//" >expect &&
-4:Subject: [PATCH] EOL
-8:
-9:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       cat <<-\EOF | sed "s/EOL$//" >expect &&
+       4:Subject: [PATCH] EOL
+       8:
+       9:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: commit with only subject' '
        echo subject | append_signoff >actual &&
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-9:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       9:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: commit with only subject that does not end with 
NL' '
        printf subject | append_signoff >actual &&
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-9:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       9:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: no existing signoffs' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-body
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-10:
-11:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       body
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       10:
+       11:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: no existing signoffs and no trailing NL' '
        printf "subject\n\nbody" | append_signoff >actual &&
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-10:
-11:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       10:
+       11:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: some random signoff' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-body
+       body
 
-Signed-off-by: my@house
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-10:
-11:Signed-off-by: my@house
-12:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       Signed-off-by: my@house
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       10:
+       11:Signed-off-by: my@house
+       12:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: misc conforming footer elements' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-body
+       body
 
-Signed-off-by: my@house
-(cherry picked from commit da39a3ee5e6b4b0d3255bfef95601890afd80709)
-Tested-by: Some One <some...@example.com>
-Bug: 1234
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-10:
-11:Signed-off-by: my@house
-15:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       Signed-off-by: my@house
+       (cherry picked from commit da39a3ee5e6b4b0d3255bfef95601890afd80709)
+       Tested-by: Some One <some...@example.com>
+       Bug: 1234
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       10:
+       11:Signed-off-by: my@house
+       15:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: some random signoff-alike' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-body
-Fooled-by-me: my@house
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-11:
-12:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       body
+       Fooled-by-me: my@house
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       11:
+       12:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: not really a signoff' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-I want to mention about Signed-off-by: here.
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-9:I want to mention about Signed-off-by: here.
-10:
-11:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       I want to mention about Signed-off-by: here.
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       9:I want to mention about Signed-off-by: here.
+       10:
+       11:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: not really a signoff (2)' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-My unfortunate
-Signed-off-by: example happens to be wrapped here.
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-10:Signed-off-by: example happens to be wrapped here.
-11:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       My unfortunate
+       Signed-off-by: example happens to be wrapped here.
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       10:Signed-off-by: example happens to be wrapped here.
+       11:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: valid S-o-b paragraph in the middle' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-Signed-off-by: my@house
-Signed-off-by: your@house
+       Signed-off-by: my@house
+       Signed-off-by: your@house
 
-A lot of houses.
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-9:Signed-off-by: my@house
-10:Signed-off-by: your@house
-11:
-13:
-14:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       A lot of houses.
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       9:Signed-off-by: my@house
+       10:Signed-off-by: your@house
+       11:
+       13:
+       14:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: the same signoff at the end' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-body
+       body
 
-Signed-off-by: C O Mitter <commit...@example.com>
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-10:
-11:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       10:
+       11:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: the same signoff at the end, no trailing NL' '
        printf "subject\n\nSigned-off-by: C O Mitter <commit...@example.com>" |
                append_signoff >actual &&
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-9:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       9:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: the same signoff NOT at the end' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-body
+       body
 
-Signed-off-by: C O Mitter <commit...@example.com>
-Signed-off-by: my@house
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-10:
-11:Signed-off-by: C O Mitter <commit...@example.com>
-12:Signed-off-by: my@house
-EOF
+       Signed-off-by: C O Mitter <commit...@example.com>
+       Signed-off-by: my@house
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       10:
+       11:Signed-off-by: C O Mitter <commit...@example.com>
+       12:Signed-off-by: my@house
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: tolerate garbage in conforming footer' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-body
+       body
 
-Tested-by: my@house
-Some Trash
-Signed-off-by: C O Mitter <commit...@example.com>
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-10:
-13:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       Tested-by: my@house
+       Some Trash
+       Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       10:
+       13:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: respect trailer config' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-Myfooter: x
-Some Trash
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-11:
-12:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       Myfooter: x
+       Some Trash
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       11:
+       12:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual &&
 
        test_config trailer.Myfooter.ifexists add &&
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-Myfooter: x
-Some Trash
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-11:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       Myfooter: x
+       Some Trash
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       11:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
 test_expect_success 'signoff: footer begins with non-signoff without @ sign' '
-       append_signoff <<\EOF >actual &&
-subject
+       append_signoff <<-\EOF >actual &&
+       subject
 
-body
+       body
 
-Reviewed-id: Noone
-Tested-by: my@house
-Change-id: Ideadbeef
-Signed-off-by: C O Mitter <commit...@example.com>
-Bug: 1234
-EOF
-       cat >expect <<\EOF &&
-4:Subject: [PATCH] subject
-8:
-10:
-14:Signed-off-by: C O Mitter <commit...@example.com>
-EOF
+       Reviewed-id: Noone
+       Tested-by: my@house
+       Change-id: Ideadbeef
+       Signed-off-by: C O Mitter <commit...@example.com>
+       Bug: 1234
+       EOF
+       cat >expect <<-\EOF &&
+       4:Subject: [PATCH] subject
+       8:
+       10:
+       14:Signed-off-by: C O Mitter <commit...@example.com>
+       EOF
        test_cmp expect actual
 '
 
-- 
2.23.0.248.g3a9dd8fb08

Reply via email to