modernize t9300: mark here-doc words to ignore tab indentation

In the next commit, we will indent test case preparations. This will require that here-documents ignore the tab indentation. Prepare for this change by marking the here-doc words accordingly. This does not have an effect now, but will remove some noise from the git diff -b output of the next commit. The change here is entirely automated with this perl command: perl -i -lpe 's/(cat.*<<) *((EOF|(EXPECT|INPUT)_END).*$)/$1-$2 &&/' t/t9300-fast-import.sh i.e., inserts a dash between << and the EOF word (and removes blanks that our style guide abhors) and appends the && that will become necessary. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Jeff King <peff@peff.net>

Johannes Sixt committed Nov 19, 2015 at 20:09 UTC 0ca2972345d6de3b9eb845af4b0e9b701af120bd
1 file changed +100 -100
t/t9300-fast-import.sh
+100 -100
@@ -57,7 +57,7 @@ test_expect_success 'empty stream succeeds' '
57 git fast-import </dev/null
58 '
59
60 -cat >input <<INPUT_END
60 +cat >input <<-INPUT_END &&
61 blob
62 mark :2
63 data <<EOF
@@ -107,7 +107,7 @@ test_expect_success 'A: verify pack' '
107 verify_packs
108 '
109
110 -cat >expect <<EOF
110 +cat >expect <<-EOF &&
111 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
112 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
113
@@ -118,7 +118,7 @@ test_expect_success 'A: verify commit' '
118 test_cmp expect actual
119 '
120
121 -cat >expect <<EOF
121 +cat >expect <<-EOF &&
122 100644 blob file2
123 100644 blob file3
124 100755 blob file4
@@ -146,7 +146,7 @@ test_expect_success 'A: verify file4' '
146 test_cmp expect actual
147 '
148
149 -cat >expect <<EOF
149 +cat >expect <<-EOF &&
150 object $(git rev-parse refs/heads/master)
151 type commit
152 tag series-A
@@ -158,7 +158,7 @@ test_expect_success 'A: verify tag/series-A' '
158 test_cmp expect actual
159 '
160
161 -cat >expect <<EOF
161 +cat >expect <<-EOF &&
162 object $(git rev-parse refs/heads/master:file3)
163 type blob
164 tag series-A-blob
@@ -170,7 +170,7 @@ test_expect_success 'A: verify tag/series-A-blob' '
170 test_cmp expect actual
171 '
172
173 -cat >expect <<EOF
173 +cat >expect <<-EOF &&
174 :2 `git rev-parse --verify master:file2`
175 :3 `git rev-parse --verify master:file3`
176 :4 `git rev-parse --verify master:file4`
@@ -190,7 +190,7 @@ test_expect_success 'A: verify marks import' '
190
191 test_tick
192 new_blob=$(echo testing | git hash-object --stdin)
193 -cat >input <<INPUT_END
193 +cat >input <<-INPUT_END &&
194 tag series-A-blob-2
195 from $(git rev-parse refs/heads/master:file3)
196 data <<EOF
@@ -217,7 +217,7 @@ Tag new_blob.
217 EOF
218 INPUT_END
219
220 -cat >expect <<EOF
220 +cat >expect <<-EOF &&
221 object $(git rev-parse refs/heads/master:file3)
222 type blob
223 tag series-A-blob-2
@@ -238,7 +238,7 @@ test_expect_success 'A: tag blob by sha1' '
238 '
239
240 test_tick
241 -cat >input <<INPUT_END
241 +cat >input <<-INPUT_END &&
242 commit refs/heads/verify--import-marks
243 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
244 data <<COMMIT
@@ -258,7 +258,7 @@ test_expect_success 'A: verify pack' '
258 verify_packs
259 '
260
261 -cat >expect <<EOF
261 +cat >expect <<-EOF &&
262 :000000 100755 0000000000000000000000000000000000000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 A copy-of-file2
263 EOF
264 git diff-tree -M -r master verify--import-marks >actual
@@ -274,7 +274,7 @@ mt=$(git hash-object --stdin < /dev/null)
274 : >marks.exp
275 : >tree.exp
276
277 -cat >input.commit <<EOF
277 +cat >input.commit <<-EOF &&
278 commit refs/heads/verify--dump-marks
279 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
280 data <<COMMIT
@@ -287,7 +287,7 @@ l=4
287 m=6
288 n=7
289 while test "$i" -lt 27; do
290 - cat >>input.blob <<EOF
290 + cat >>input.blob <<-EOF &&
291 blob
292 mark :$l
293 data 0
@@ -331,7 +331,7 @@ test_expect_success 'A: export marks with large values' '
331 ###
332
333 test_tick
334 -cat >input <<INPUT_END
334 +cat >input <<-INPUT_END &&
335 commit refs/heads/branch
336 mark :1
337 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -348,7 +348,7 @@ test_expect_success 'B: fail on invalid blob sha1' '
348 test_must_fail git fast-import <input
349 '
350
351 -cat >input <<INPUT_END
351 +cat >input <<-INPUT_END &&
352 commit TEMP_TAG
353 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
354 data <<COMMIT
@@ -367,7 +367,7 @@ test_expect_success 'B: accept branch name "TEMP_TAG"' '
367 test `git rev-parse master` = `git rev-parse TEMP_TAG^`
368 '
369
370 -cat >input <<INPUT_END
370 +cat >input <<-INPUT_END &&
371 commit refs/heads/empty-committer-1
372 committer <> $GIT_COMMITTER_DATE
373 data <<COMMIT
@@ -384,7 +384,7 @@ test_expect_success 'B: accept empty committer' '
384 test -z "$out"
385 '
386
387 -cat >input <<INPUT_END
387 +cat >input <<-INPUT_END &&
388 commit refs/heads/empty-committer-2
389 committer <a@b.com> $GIT_COMMITTER_DATE
390 data <<COMMIT
@@ -401,7 +401,7 @@ test_expect_success 'B: accept and fixup committer with no name' '
401 test -z "$out"
402 '
403
404 -cat >input <<INPUT_END
404 +cat >input <<-INPUT_END &&
405 commit refs/heads/invalid-committer
406 committer Name email> $GIT_COMMITTER_DATE
407 data <<COMMIT
@@ -413,7 +413,7 @@ test_expect_success 'B: fail on invalid committer (1)' '
413 test_must_fail git fast-import <input
414 '
415
416 -cat >input <<INPUT_END
416 +cat >input <<-INPUT_END &&
417 commit refs/heads/invalid-committer
418 committer Name <e<mail> $GIT_COMMITTER_DATE
419 data <<COMMIT
@@ -425,7 +425,7 @@ test_expect_success 'B: fail on invalid committer (2)' '
425 test_must_fail git fast-import <input
426 '
427
428 -cat >input <<INPUT_END
428 +cat >input <<-INPUT_END &&
429 commit refs/heads/invalid-committer
430 committer Name <email>> $GIT_COMMITTER_DATE
431 data <<COMMIT
@@ -437,7 +437,7 @@ test_expect_success 'B: fail on invalid committer (3)' '
437 test_must_fail git fast-import <input
438 '
439
440 -cat >input <<INPUT_END
440 +cat >input <<-INPUT_END &&
441 commit refs/heads/invalid-committer
442 committer Name <email $GIT_COMMITTER_DATE
443 data <<COMMIT
@@ -449,7 +449,7 @@ test_expect_success 'B: fail on invalid committer (4)' '
449 test_must_fail git fast-import <input
450 '
451
452 -cat >input <<INPUT_END
452 +cat >input <<-INPUT_END &&
453 commit refs/heads/invalid-committer
454 committer Name<email> $GIT_COMMITTER_DATE
455 data <<COMMIT
@@ -468,7 +468,7 @@ test_expect_success 'B: fail on invalid committer (5)' '
468 newf=`echo hi newf | git hash-object -w --stdin`
469 oldf=`git rev-parse --verify master:file2`
470 test_tick
471 -cat >input <<INPUT_END
471 +cat >input <<-INPUT_END &&
472 commit refs/heads/branch
473 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
474 data <<COMMIT
@@ -495,7 +495,7 @@ test_expect_success 'C: validate reuse existing blob' '
495 test $oldf = `git rev-parse --verify branch:file2/oldf`
496 '
497
498 -cat >expect <<EOF
498 +cat >expect <<-EOF &&
499 parent `git rev-parse --verify master^0`
500 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
501 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -507,7 +507,7 @@ test_expect_success 'C: verify commit' '
507 test_cmp expect actual
508 '
509
510 -cat >expect <<EOF
510 +cat >expect <<-EOF &&
511 :000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A file2/newf
512 :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 R100 file2 file2/oldf
513 :100644 000000 0d92e9f3374ae2947c23aa477cbc68ce598135f1 0000000000000000000000000000000000000000 D file3
@@ -522,7 +522,7 @@ test_expect_success 'C: validate rename result' '
522 ###
523
524 test_tick
525 -cat >input <<INPUT_END
525 +cat >input <<-INPUT_END &&
526 commit refs/heads/branch
527 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
528 data <<COMMIT
@@ -550,7 +550,7 @@ test_expect_success 'D: verify pack' '
550 verify_packs
551 '
552
553 -cat >expect <<EOF
553 +cat >expect <<-EOF &&
554 :000000 100755 0000000000000000000000000000000000000000 e74b7d465e52746be2b4bae983670711e6e66657 A newdir/exec.sh
555 :000000 100644 0000000000000000000000000000000000000000 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 A newdir/interesting
556 EOF
@@ -575,7 +575,7 @@ test_expect_success 'D: verify file6' '
575 ### series E
576 ###
577
578 -cat >input <<INPUT_END
578 +cat >input <<-INPUT_END &&
579 commit refs/heads/branch
580 author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> Tue Feb 6 11:22:18 2007 -0500
581 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> Tue Feb 6 12:35:02 2007 -0500
@@ -597,7 +597,7 @@ test_expect_success 'E: verify pack' '
597 verify_packs
598 '
599
600 -cat >expect <<EOF
600 +cat >expect <<-EOF &&
601 author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 1170778938 -0500
602 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1170783302 -0500
603
@@ -614,7 +614,7 @@ test_expect_success 'E: verify commit' '
614
615 old_branch=`git rev-parse --verify branch^0`
616 test_tick
617 -cat >input <<INPUT_END
617 +cat >input <<-INPUT_END &&
618 commit refs/heads/branch
619 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
620 data <<COMMIT
@@ -637,7 +637,7 @@ test_expect_success 'F: verify pack' '
637 verify_packs
638 '
639
640 -cat >expect <<EOF
640 +cat >expect <<-EOF &&
641 tree `git rev-parse branch~1^{tree}`
642 parent `git rev-parse branch~1`
643 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -656,7 +656,7 @@ test_expect_success 'F: verify other commit' '
656
657 old_branch=`git rev-parse --verify branch^0`
658 test_tick
659 -cat >input <<INPUT_END
659 +cat >input <<-INPUT_END &&
660 commit refs/heads/branch
661 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
662 data <<COMMIT
@@ -684,7 +684,7 @@ test_expect_success 'G: branch changed, but logged' '
684 ###
685
686 test_tick
687 -cat >input <<INPUT_END
687 +cat >input <<-INPUT_END &&
688 commit refs/heads/H
689 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
690 data <<COMMIT
@@ -713,7 +713,7 @@ test_expect_success 'H: verify pack' '
713 verify_packs
714 '
715
716 -cat >expect <<EOF
716 +cat >expect <<-EOF &&
717 :100755 000000 f1fb5da718392694d0076d677d6d0e364c79b0bc 0000000000000000000000000000000000000000 D file2/newf
718 :100644 000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 0000000000000000000000000000000000000000 D file2/oldf
719 :100755 000000 85df50785d62d3b05ab03d9cbf7e4a0b49449730 0000000000000000000000000000000000000000 D file4
@@ -735,7 +735,7 @@ test_expect_success 'H: verify file' '
735 ### series I
736 ###
737
738 -cat >input <<INPUT_END
738 +cat >input <<-INPUT_END &&
739 commit refs/heads/export-boundary
740 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
741 data <<COMMIT
@@ -749,7 +749,7 @@ test_expect_success 'I: export-pack-edges' '
749 git fast-import --export-pack-edges=edges.list <input
750 '
751
752 -cat >expect <<EOF
752 +cat >expect <<-EOF &&
753 .git/objects/pack/pack-.pack: `git rev-parse --verify export-boundary`
754 EOF
755 test_expect_success 'I: verify edge list' '
@@ -761,7 +761,7 @@ test_expect_success 'I: verify edge list' '
761 ### series J
762 ###
763
764 -cat >input <<INPUT_END
764 +cat >input <<-INPUT_END &&
765 commit refs/heads/J
766 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
767 data <<COMMIT
@@ -787,7 +787,7 @@ test_expect_success 'J: branch has 1 commit, empty tree' '
787 test 0 = `git ls-tree J | wc -l`
788 '
789
790 -cat >input <<INPUT_END
790 +cat >input <<-INPUT_END &&
791 reset refs/heads/J2
792
793 tag wrong_tag
@@ -803,7 +803,7 @@ test_expect_success 'J: tag must fail on empty branch' '
803 ### series K
804 ###
805
806 -cat >input <<INPUT_END
806 +cat >input <<-INPUT_END &&
807 commit refs/heads/K
808 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
809 data <<COMMIT
@@ -833,7 +833,7 @@ test_expect_success 'K: verify K^1 = branch^1' '
833 ### series L
834 ###
835
836 -cat >input <<INPUT_END
836 +cat >input <<-INPUT_END &&
837 blob
838 mark :1
839 data <<EOF
@@ -867,7 +867,7 @@ M 644 :2 b/other
867 M 644 :2 ba
868 INPUT_END
869
870 -cat >expect <<EXPECT_END
870 +cat >expect <<-EXPECT_END &&
871 :100644 100644 4268632... 55d3a52... M b.
872 :040000 040000 0ae5cac... 443c768... M b
873 :100644 100644 4268632... 55d3a52... M ba
@@ -879,7 +879,7 @@ test_expect_success 'L: verify internal tree sorting' '
879 test_cmp expect output
880 '
881
882 -cat >input <<INPUT_END
882 +cat >input <<-INPUT_END &&
883 blob
884 mark :1
885 data <<EOF
@@ -905,7 +905,7 @@ C a/e g/b
905 M 644 :1 g/b/h
906 INPUT_END
907
908 -cat <<EOF >expect
908 +cat <<-EOF >expect &&
909 g/b/f
910 g/b/h
911 EOF
@@ -924,7 +924,7 @@ test_expect_success 'L: nested tree copy does not corrupt deltas' '
924 ###
925
926 test_tick
927 -cat >input <<INPUT_END
927 +cat >input <<-INPUT_END &&
928 commit refs/heads/M1
929 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
930 data <<COMMIT
@@ -936,7 +936,7 @@ R file2/newf file2/n.e.w.f
936
937 INPUT_END
938
939 -cat >expect <<EOF
939 +cat >expect <<-EOF &&
940 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100 file2/newf file2/n.e.w.f
941 EOF
942 test_expect_success 'M: rename file in same subdirectory' '
@@ -945,7 +945,7 @@ test_expect_success 'M: rename file in same subdirectory' '
945 compare_diff_raw expect actual
946 '
947
948 -cat >input <<INPUT_END
948 +cat >input <<-INPUT_END &&
949 commit refs/heads/M2
950 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
951 data <<COMMIT
@@ -957,7 +957,7 @@ R file2/newf i/am/new/to/you
957
958 INPUT_END
959
960 -cat >expect <<EOF
960 +cat >expect <<-EOF &&
961 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100 file2/newf i/am/new/to/you
962 EOF
963 test_expect_success 'M: rename file to new subdirectory' '
@@ -966,7 +966,7 @@ test_expect_success 'M: rename file to new subdirectory' '
966 compare_diff_raw expect actual
967 '
968
969 -cat >input <<INPUT_END
969 +cat >input <<-INPUT_END &&
970 commit refs/heads/M3
971 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
972 data <<COMMIT
@@ -978,7 +978,7 @@ R i other/sub
978
979 INPUT_END
980
981 -cat >expect <<EOF
981 +cat >expect <<-EOF &&
982 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100 i/am/new/to/you other/sub/am/new/to/you
983 EOF
984 test_expect_success 'M: rename subdirectory to new subdirectory' '
@@ -987,7 +987,7 @@ test_expect_success 'M: rename subdirectory to new subdirectory' '
987 compare_diff_raw expect actual
988 '
989
990 -cat >input <<INPUT_END
990 +cat >input <<-INPUT_END &&
991 commit refs/heads/M4
992 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
993 data <<COMMIT
@@ -999,7 +999,7 @@ R "" sub
999
1000 INPUT_END
1001
1002 -cat >expect <<EOF
1002 +cat >expect <<-EOF &&
1003 :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 R100 file2/oldf sub/file2/oldf
1004 :100755 100755 85df50785d62d3b05ab03d9cbf7e4a0b49449730 85df50785d62d3b05ab03d9cbf7e4a0b49449730 R100 file4 sub/file4
1005 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100 i/am/new/to/you sub/i/am/new/to/you
@@ -1018,7 +1018,7 @@ test_expect_success 'M: rename root to subdirectory' '
1018 ###
1019
1020 test_tick
1021 -cat >input <<INPUT_END
1021 +cat >input <<-INPUT_END &&
1022 commit refs/heads/N1
1023 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1024 data <<COMMIT
@@ -1030,7 +1030,7 @@ C file2/newf file2/n.e.w.f
1030
1031 INPUT_END
1032
1033 -cat >expect <<EOF
1033 +cat >expect <<-EOF &&
1034 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf file2/n.e.w.f
1035 EOF
1036 test_expect_success 'N: copy file in same subdirectory' '
@@ -1039,7 +1039,7 @@ test_expect_success 'N: copy file in same subdirectory' '
1039 compare_diff_raw expect actual
1040 '
1041
1042 -cat >input <<INPUT_END
1042 +cat >input <<-INPUT_END &&
1043 commit refs/heads/N2
1044 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1045 data <<COMMIT
@@ -1062,7 +1062,7 @@ EOF
1062
1063 INPUT_END
1064
1065 -cat >expect <<EOF
1065 +cat >expect <<-EOF &&
1066 :100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100 newdir/interesting file3/file5
1067 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf file3/newf
1068 :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100 file2/oldf file3/oldf
@@ -1073,7 +1073,7 @@ test_expect_success 'N: copy then modify subdirectory' '
1073 compare_diff_raw expect actual
1074 '
1075
1076 -cat >input <<INPUT_END
1076 +cat >input <<-INPUT_END &&
1077 commit refs/heads/N3
1078 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1079 data <<COMMIT
@@ -1457,7 +1457,7 @@ test_expect_success 'N: modify subtree, extract it, and modify again' '
1457 ### series O
1458 ###
1459
1460 -cat >input <<INPUT_END
1460 +cat >input <<-INPUT_END &&
1461 #we will
1462 commit refs/heads/O1
1463 # -- ignore all of this text
@@ -1493,7 +1493,7 @@ test_expect_success 'O: comments are all skipped' '
1493 test `git rev-parse N3` = `git rev-parse O1`
1494 '
1495
1496 -cat >input <<INPUT_END
1496 +cat >input <<-INPUT_END &&
1497 commit refs/heads/O2
1498 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1499 data <<COMMIT
@@ -1518,7 +1518,7 @@ test_expect_success 'O: repack before next test' '
1518 git repack -a -d
1519 '
1520
1521 -cat >input <<INPUT_END
1521 +cat >input <<-INPUT_END &&
1522 commit refs/heads/O3
1523 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1524 data <<COMMIT
@@ -1548,7 +1548,7 @@ reset refs/tags/O3-3rd
1548 from :5
1549 INPUT_END
1550
1551 -cat >expect <<INPUT_END
1551 +cat >expect <<-INPUT_END &&
1552 string
1553 of
1554 empty
@@ -1562,7 +1562,7 @@ test_expect_success 'O: blank lines not necessary after other commands' '
1562 test_cmp expect actual
1563 '
1564
1565 -cat >input <<INPUT_END
1565 +cat >input <<-INPUT_END &&
1566 commit refs/heads/O4
1567 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1568 data <<COMMIT
@@ -1597,7 +1597,7 @@ test_expect_success 'O: progress outputs as requested by input' '
1597 ### series P (gitlinks)
1598 ###
1599
1600 -cat >input <<INPUT_END
1600 +cat >input <<-INPUT_END &&
1601 blob
1602 mark :1
1603 data 10
@@ -1670,7 +1670,7 @@ test_expect_success 'P: superproject & submodule mix' '
1670 SUBLAST=$(git rev-parse --verify sub)
1671 SUBPREV=$(git rev-parse --verify sub^)
1672
1673 -cat >input <<INPUT_END
1673 +cat >input <<-INPUT_END &&
1674 blob
1675 mark :1
1676 data <<DATAEND
@@ -1707,7 +1707,7 @@ test_expect_success 'P: verbatim SHA gitlinks' '
1707 '
1708
1709 test_tick
1710 -cat >input <<INPUT_END
1710 +cat >input <<-INPUT_END &&
1711 commit refs/heads/subuse3
1712 mark :1
1713 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -1728,7 +1728,7 @@ test_expect_success 'P: fail on inline gitlink' '
1728 '
1729
1730 test_tick
1731 -cat >input <<INPUT_END
1731 +cat >input <<-INPUT_END &&
1732 blob
1733 mark :1
1734 data <<DATA
@@ -1763,7 +1763,7 @@ note1c_data="The third note for the first commit"
1763 note2b_data="The second note for the second commit"
1764
1765 test_tick
1766 -cat >input <<INPUT_END
1766 +cat >input <<-INPUT_END &&
1767 blob
1768 mark :2
1769 data <<EOF
@@ -1887,7 +1887,7 @@ commit1=$(git rev-parse notes-test~2)
1887 commit2=$(git rev-parse notes-test^)
1888 commit3=$(git rev-parse notes-test)
1889
1890 -cat >expect <<EOF
1890 +cat >expect <<-EOF &&
1891 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1892 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1893
@@ -1898,7 +1898,7 @@ test_expect_success 'Q: verify first commit' '
1898 test_cmp expect actual
1899 '
1900
1901 -cat >expect <<EOF
1901 +cat >expect <<-EOF &&
1902 parent $commit1
1903 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1904 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -1910,7 +1910,7 @@ test_expect_success 'Q: verify second commit' '
1910 test_cmp expect actual
1911 '
1912
1913 -cat >expect <<EOF
1913 +cat >expect <<-EOF &&
1914 parent $commit2
1915 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1916 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -1922,7 +1922,7 @@ test_expect_success 'Q: verify third commit' '
1922 test_cmp expect actual
1923 '
1924
1925 -cat >expect <<EOF
1925 +cat >expect <<-EOF &&
1926 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1927 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1928
@@ -1933,7 +1933,7 @@ test_expect_success 'Q: verify first notes commit' '
1933 test_cmp expect actual
1934 '
1935
1936 -cat >expect.unsorted <<EOF
1936 +cat >expect.unsorted <<-EOF &&
1937 100644 blob $commit1
1938 100644 blob $commit2
1939 100644 blob $commit3
@@ -1962,7 +1962,7 @@ test_expect_success 'Q: verify first note for third commit' '
1962 test_cmp expect actual
1963 '
1964
1965 -cat >expect <<EOF
1965 +cat >expect <<-EOF &&
1966 parent `git rev-parse --verify refs/notes/foobar~2`
1967 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1968 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -1974,7 +1974,7 @@ test_expect_success 'Q: verify second notes commit' '
1974 test_cmp expect actual
1975 '
1976
1977 -cat >expect.unsorted <<EOF
1977 +cat >expect.unsorted <<-EOF &&
1978 100644 blob $commit1
1979 100644 blob $commit2
1980 100644 blob $commit3
@@ -2003,7 +2003,7 @@ test_expect_success 'Q: verify first note for third commit' '
2003 test_cmp expect actual
2004 '
2005
2006 -cat >expect <<EOF
2006 +cat >expect <<-EOF &&
2007 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
2008 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
2009
@@ -2014,7 +2014,7 @@ test_expect_success 'Q: verify third notes commit' '
2014 test_cmp expect actual
2015 '
2016
2017 -cat >expect.unsorted <<EOF
2017 +cat >expect.unsorted <<-EOF &&
2018 100644 blob $commit1
2019 EOF
2020 cat expect.unsorted | sort >expect
@@ -2029,7 +2029,7 @@ test_expect_success 'Q: verify third note for first commit' '
2029 test_cmp expect actual
2030 '
2031
2032 -cat >expect <<EOF
2032 +cat >expect <<-EOF &&
2033 parent `git rev-parse --verify refs/notes/foobar^`
2034 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
2035 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -2041,7 +2041,7 @@ test_expect_success 'Q: verify fourth notes commit' '
2041 test_cmp expect actual
2042 '
2043
2044 -cat >expect.unsorted <<EOF
2044 +cat >expect.unsorted <<-EOF &&
2045 100644 blob $commit2
2046 EOF
2047 cat expect.unsorted | sort >expect
@@ -2056,7 +2056,7 @@ test_expect_success 'Q: verify second note for second commit' '
2056 test_cmp expect actual
2057 '
2058
2059 -cat >input <<EOF
2059 +cat >input <<-EOF &&
2060 reset refs/heads/Q0
2061
2062 commit refs/heads/note-Q0
@@ -2077,7 +2077,7 @@ test_expect_success 'Q: deny note on empty branch' '
2077 ### series R (feature and option)
2078 ###
2079
2080 -cat >input <<EOF
2080 +cat >input <<-EOF &&
2081 feature no-such-feature-exists
2082 EOF
2083
@@ -2085,7 +2085,7 @@ test_expect_success 'R: abort on unsupported feature' '
2085 test_must_fail git fast-import <input
2086 '
2087
2088 -cat >input <<EOF
2088 +cat >input <<-EOF &&
2089 feature date-format=now
2090 EOF
2091
@@ -2093,7 +2093,7 @@ test_expect_success 'R: supported feature is accepted' '
2093 git fast-import <input
2094 '
2095
2096 -cat >input << EOF
2096 +cat >input <<-EOF &&
2097 blob
2098 data 3
2099 hi
@@ -2104,7 +2104,7 @@ test_expect_success 'R: abort on receiving feature after data command' '
2104 test_must_fail git fast-import <input
2105 '
2106
2107 -cat >input << EOF
2107 +cat >input <<-EOF &&
2108 feature import-marks=git.marks
2109 feature import-marks=git2.marks
2110 EOF
@@ -2113,7 +2113,7 @@ test_expect_success 'R: only one import-marks feature allowed per stream' '
2113 test_must_fail git fast-import <input
2114 '
2115
2116 -cat >input << EOF
2116 +cat >input <<-EOF &&
2117 feature export-marks=git.marks
2118 blob
2119 mark :1
@@ -2234,7 +2234,7 @@ test_expect_success 'R: feature import-marks-if-exists' '
2234 test_cmp expect io.marks
2235 '
2236
2237 -cat >input << EOF
2237 +cat >input <<-EOF &&
2238 feature import-marks=marks.out
2239 feature export-marks=marks.new
2240 EOF
@@ -2244,7 +2244,7 @@ test_expect_success 'R: import to output marks works without any content' '
2244 test_cmp marks.out marks.new
2245 '
2246
2247 -cat >input <<EOF
2247 +cat >input <<-EOF &&
2248 feature import-marks=nonexistent.marks
2249 feature export-marks=marks.new
2250 EOF
@@ -2255,7 +2255,7 @@ test_expect_success 'R: import marks prefers commandline marks file over the str
2255 '
2256
2257
2258 -cat >input <<EOF
2258 +cat >input <<-EOF &&
2259 feature import-marks=nonexistent.marks
2260 feature export-marks=combined.marks
2261 EOF
@@ -2267,7 +2267,7 @@ test_expect_success 'R: multiple --import-marks= should be honoured' '
2267 test_cmp marks.out combined.marks
2268 '
2269
2270 -cat >input <<EOF
2270 +cat >input <<-EOF &&
2271 feature relative-marks
2272 feature import-marks=relative.in
2273 feature export-marks=relative.out
@@ -2280,7 +2280,7 @@ test_expect_success 'R: feature relative-marks should be honoured' '
2280 test_cmp marks.new .git/info/fast-import/relative.out
2281 '
2282
2283 -cat >input <<EOF
2283 +cat >input <<-EOF &&
2284 feature relative-marks
2285 feature import-marks=relative.in
2286 feature no-relative-marks
@@ -2549,7 +2549,7 @@ test_expect_success PIPE 'R: print staged blob within commit' '
2549 test_cmp expect actual
2550 '
2551
2552 -cat >input << EOF
2552 +cat >input <<-EOF &&
2553 option git quiet
2554 blob
2555 data 3
@@ -2604,7 +2604,7 @@ test_expect_success 'R: terminating "done" within commit' '
2604 test_cmp expect actual
2605 '
2606
2607 -cat >input <<EOF
2607 +cat >input <<-EOF &&
2608 option git non-existing-option
2609 EOF
2610
@@ -2624,7 +2624,7 @@ test_expect_success 'R: die on invalid option argument' '
2624 test_must_fail git fast-import --depth="5 elephants" </dev/null
2625 '
2626
2627 -cat >input <<EOF
2627 +cat >input <<-EOF &&
2628 option non-existing-vcs non-existing-option
2629 EOF
2630
@@ -2637,7 +2637,7 @@ test_expect_success 'R: ignore non-git options' '
2637 ##
2638 blobsize=$((2*1024*1024 + 53))
2639 test-genrandom bar $blobsize >expect
2640 -cat >input <<INPUT_END
2640 +cat >input <<-INPUT_END &&
2641 commit refs/heads/big-file
2642 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
2643 data <<COMMIT
@@ -2648,7 +2648,7 @@ M 644 inline big1
2648 data $blobsize
2649 INPUT_END
2650 cat expect >>input
2651 -cat >>input <<INPUT_END
2651 +cat >>input <<-INPUT_END &&
2652 M 644 inline big2
2653 data $blobsize
2654 INPUT_END
@@ -2713,7 +2713,7 @@ test_expect_success 'R: blob appears only once' '
2713 #
2714 test_tick
2715
2716 -cat >input <<INPUT_END
2716 +cat >input <<-INPUT_END &&
2717 commit refs/heads/S
2718 mark :301
2719 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -3002,7 +3002,7 @@ test_expect_success 'T: empty reset doesnt delete branch' '
3002 ### series U (filedelete)
3003 ###
3004
3005 -cat >input <<INPUT_END
3005 +cat >input <<-INPUT_END &&
3006 commit refs/heads/U
3007 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
3008 data <<COMMIT
@@ -3027,7 +3027,7 @@ test_expect_success 'U: initialize for U tests' '
3027 git fast-import <input
3028 '
3029
3030 -cat >input <<INPUT_END
3030 +cat >input <<-INPUT_END &&
3031 commit refs/heads/U
3032 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
3033 data <<COMMIT
@@ -3042,7 +3042,7 @@ test_expect_success 'U: filedelete file succeeds' '
3042 git fast-import <input
3043 '
3044
3045 -cat >expect <<EOF
3045 +cat >expect <<-EOF &&
3046 :100644 000000 2907ebb4bf85d91bf0716bb3bd8a68ef48d6da76 0000000000000000000000000000000000000000 D good/night.txt
3047 EOF
3048
@@ -3052,7 +3052,7 @@ test_expect_success 'U: validate file delete result' '
3052 compare_diff_raw expect actual
3053 '
3054
3055 -cat >input <<INPUT_END
3055 +cat >input <<-INPUT_END &&
3056 commit refs/heads/U
3057 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
3058 data <<COMMIT
@@ -3067,7 +3067,7 @@ test_expect_success 'U: filedelete directory succeeds' '
3067 git fast-import <input
3068 '
3069
3070 -cat >expect <<EOF
3070 +cat >expect <<-EOF &&
3071 :100644 000000 69cb75792f55123d8389c156b0b41c2ff00ed507 0000000000000000000000000000000000000000 D good/bye.txt
3072 EOF
3073
@@ -3077,7 +3077,7 @@ test_expect_success 'U: validate directory delete result' '
3077 compare_diff_raw expect actual
3078 '
3079
3080 -cat >input <<INPUT_END
3080 +cat >input <<-INPUT_END &&
3081 commit refs/heads/U
3082 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
3083 data <<COMMIT
@@ -3092,7 +3092,7 @@ test_expect_success 'U: filedelete root succeeds' '
3092 git fast-import <input
3093 '
3094
3095 -cat >expect <<EOF
3095 +cat >expect <<-EOF &&
3096 :100644 000000 c18147dc648481eeb65dc5e66628429a64843327 0000000000000000000000000000000000000000 D hello.c
3097 EOF
3098