modernize t9300: single-quote placement and indentation

Many test cases do not follow our modern style that places the single-quotes that surround the shell code snippets before and after the shell code. Make it so. Many of the lines changed in this way are indented other than by a single tab. Change them (and some additional lines) to be indented with a tab. 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 d67824feaa1613d363834b93e40c70b93791952b
1 file changed +437 -435
t/t9300-fast-import.sh
+437 -435
@@ -100,10 +100,10 @@ An annotated tag that annotates a blob.
100 EOF
101
102 INPUT_END
103 -test_expect_success \
104 - 'A: create pack from stdin' \
105 - 'git fast-import --export-marks=marks.out <input &&
106 - git whatchanged master'
103 +test_expect_success 'A: create pack from stdin' '
104 + git fast-import --export-marks=marks.out <input &&
105 + git whatchanged master
106 +'
107
108 test_expect_success 'A: verify pack' '
109 verify_packs
@@ -115,35 +115,35 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
115
116 initial
117 EOF
118 -test_expect_success \
119 - 'A: verify commit' \
120 - 'git cat-file commit master | sed 1d >actual &&
121 - test_cmp expect actual'
118 +test_expect_success 'A: verify commit' '
119 + git cat-file commit master | sed 1d >actual &&
120 + test_cmp expect actual
121 +'
122
123 cat >expect <<EOF
124 100644 blob file2
125 100644 blob file3
126 100755 blob file4
127 EOF
128 -test_expect_success \
129 - 'A: verify tree' \
130 - 'git cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
131 - test_cmp expect actual'
128 +test_expect_success 'A: verify tree' '
129 + git cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
130 + test_cmp expect actual
131 +'
132
133 echo "$file2_data" >expect
134 -test_expect_success \
135 - 'A: verify file2' \
136 - 'git cat-file blob master:file2 >actual && test_cmp expect actual'
134 +test_expect_success 'A: verify file2' '
135 + git cat-file blob master:file2 >actual && test_cmp expect actual
136 +'
137
138 echo "$file3_data" >expect
139 -test_expect_success \
140 - 'A: verify file3' \
141 - 'git cat-file blob master:file3 >actual && test_cmp expect actual'
139 +test_expect_success 'A: verify file3' '
140 + git cat-file blob master:file3 >actual && test_cmp expect actual
141 +'
142
143 printf "$file4_data" >expect
144 -test_expect_success \
145 - 'A: verify file4' \
146 - 'git cat-file blob master:file4 >actual && test_cmp expect actual'
144 +test_expect_success 'A: verify file4' '
145 + git cat-file blob master:file4 >actual && test_cmp expect actual
146 +'
147
148 cat >expect <<EOF
149 object $(git rev-parse refs/heads/master)
@@ -175,17 +175,17 @@ cat >expect <<EOF
175 :4 `git rev-parse --verify master:file4`
176 :5 `git rev-parse --verify master^0`
177 EOF
178 -test_expect_success \
179 - 'A: verify marks output' \
180 - 'test_cmp expect marks.out'
178 +test_expect_success 'A: verify marks output' '
179 + test_cmp expect marks.out
180 +'
181
182 -test_expect_success \
183 - 'A: verify marks import' \
184 - 'git fast-import \
182 +test_expect_success 'A: verify marks import' '
183 + git fast-import \
184 --import-marks=marks.out \
185 --export-marks=marks.new \
186 </dev/null &&
188 - test_cmp expect marks.new'
187 + test_cmp expect marks.new
188 +'
189
190 test_tick
191 new_blob=$(echo testing | git hash-object --stdin)
@@ -229,12 +229,12 @@ tag series-A-blob-3
229 Tag new_blob.
230 EOF
231
232 -test_expect_success \
233 - 'A: tag blob by sha1' \
234 - 'git fast-import <input &&
232 +test_expect_success 'A: tag blob by sha1' '
233 + git fast-import <input &&
234 git cat-file tag tags/series-A-blob-2 >actual &&
235 git cat-file tag tags/series-A-blob-3 >>actual &&
237 - test_cmp expect actual'
236 + test_cmp expect actual
237 +'
238
239 test_tick
240 cat >input <<INPUT_END
@@ -248,10 +248,10 @@ from :5
248 M 755 :2 copy-of-file2
249
250 INPUT_END
251 -test_expect_success \
252 - 'A: verify marks import does not crash' \
253 - 'git fast-import --import-marks=marks.out <input &&
254 - git whatchanged verify--import-marks'
251 +test_expect_success 'A: verify marks import does not crash' '
252 + git fast-import --import-marks=marks.out <input &&
253 + git whatchanged verify--import-marks
254 +'
255
256 test_expect_success 'A: verify pack' '
257 verify_packs
@@ -261,11 +261,11 @@ cat >expect <<EOF
261 :000000 100755 0000000000000000000000000000000000000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 A copy-of-file2
262 EOF
263 git diff-tree -M -r master verify--import-marks >actual
264 -test_expect_success \
265 - 'A: verify diff' \
266 - 'compare_diff_raw expect actual &&
267 - test `git rev-parse --verify master:file2` \
268 - = `git rev-parse --verify verify--import-marks:copy-of-file2`'
264 +test_expect_success 'A: verify diff' '
265 + compare_diff_raw expect actual &&
266 + test `git rev-parse --verify master:file2` \
267 + = `git rev-parse --verify verify--import-marks:copy-of-file2`
268 +'
269
270 test_tick
271 mt=$(git hash-object --stdin < /dev/null)
@@ -322,7 +322,8 @@ test_expect_success 'A: export marks with large values' '
322 cat input.blob input.commit | git fast-import --export-marks=marks.large &&
323 git ls-tree refs/heads/verify--dump-marks >tree.out &&
324 test_cmp tree.exp_s tree.out &&
325 - test_cmp marks.exp marks.large'
325 + test_cmp marks.exp marks.large
326 +'
327
328 ###
329 ### series B
@@ -342,7 +343,7 @@ M 755 0000000000000000000000000000000000000001 zero1
343
344 INPUT_END
345 test_expect_success 'B: fail on invalid blob sha1' '
345 - test_must_fail git fast-import <input
346 + test_must_fail git fast-import <input
347 '
348 rm -f .git/objects/pack_* .git/objects/index_*
349
@@ -356,11 +357,11 @@ COMMIT
357 from refs/heads/master
358
359 INPUT_END
359 -test_expect_success \
360 - 'B: accept branch name "TEMP_TAG"' \
361 - 'git fast-import <input &&
362 - test -f .git/TEMP_TAG &&
363 - test `git rev-parse master` = `git rev-parse TEMP_TAG^`'
360 +test_expect_success 'B: accept branch name "TEMP_TAG"' '
361 + git fast-import <input &&
362 + test -f .git/TEMP_TAG &&
363 + test `git rev-parse master` = `git rev-parse TEMP_TAG^`
364 +'
365 rm -f .git/TEMP_TAG
366
367 git gc 2>/dev/null >/dev/null
@@ -482,19 +483,19 @@ M 755 $newf file2/newf
483 D file3
484
485 INPUT_END
485 -test_expect_success \
486 - 'C: incremental import create pack from stdin' \
487 - 'git fast-import <input &&
488 - git whatchanged branch'
486 +test_expect_success 'C: incremental import create pack from stdin' '
487 + git fast-import <input &&
488 + git whatchanged branch
489 +'
490
491 test_expect_success 'C: verify pack' '
492 verify_packs
493 '
494
494 -test_expect_success \
495 - 'C: validate reuse existing blob' \
496 - 'test $newf = `git rev-parse --verify branch:file2/newf` &&
497 - test $oldf = `git rev-parse --verify branch:file2/oldf`'
495 +test_expect_success 'C: validate reuse existing blob' '
496 + test $newf = `git rev-parse --verify branch:file2/newf` &&
497 + test $oldf = `git rev-parse --verify branch:file2/oldf`
498 +'
499
500 cat >expect <<EOF
501 parent `git rev-parse --verify master^0`
@@ -503,10 +504,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
504
505 second
506 EOF
506 -test_expect_success \
507 - 'C: verify commit' \
508 - 'git cat-file commit branch | sed 1d >actual &&
509 - test_cmp expect actual'
507 +test_expect_success 'C: verify commit' '
508 + git cat-file commit branch | sed 1d >actual &&
509 + test_cmp expect actual
510 +'
511
512 cat >expect <<EOF
513 :000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A file2/newf
@@ -514,9 +515,9 @@ cat >expect <<EOF
515 :100644 000000 0d92e9f3374ae2947c23aa477cbc68ce598135f1 0000000000000000000000000000000000000000 D file3
516 EOF
517 git diff-tree -M -r master branch >actual
517 -test_expect_success \
518 - 'C: validate rename result' \
519 - 'compare_diff_raw expect actual'
518 +test_expect_success 'C: validate rename result' '
519 + compare_diff_raw expect actual
520 +'
521
522 ###
523 ### series D
@@ -542,10 +543,10 @@ $file6_data
543 EOF
544
545 INPUT_END
545 -test_expect_success \
546 - 'D: inline data in commit' \
547 - 'git fast-import <input &&
548 - git whatchanged branch'
546 +test_expect_success 'D: inline data in commit' '
547 + git fast-import <input &&
548 + git whatchanged branch
549 +'
550
551 test_expect_success 'D: verify pack' '
552 verify_packs
@@ -556,21 +557,21 @@ cat >expect <<EOF
557 :000000 100644 0000000000000000000000000000000000000000 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 A newdir/interesting
558 EOF
559 git diff-tree -M -r branch^ branch >actual
559 -test_expect_success \
560 - 'D: validate new files added' \
561 - 'compare_diff_raw expect actual'
560 +test_expect_success 'D: validate new files added' '
561 + compare_diff_raw expect actual
562 +'
563
564 echo "$file5_data" >expect
564 -test_expect_success \
565 - 'D: verify file5' \
566 - 'git cat-file blob branch:newdir/interesting >actual &&
567 - test_cmp expect actual'
565 +test_expect_success 'D: verify file5' '
566 + git cat-file blob branch:newdir/interesting >actual &&
567 + test_cmp expect actual
568 +'
569
570 echo "$file6_data" >expect
570 -test_expect_success \
571 - 'D: verify file6' \
572 - 'git cat-file blob branch:newdir/exec.sh >actual &&
573 - test_cmp expect actual'
571 +test_expect_success 'D: verify file6' '
572 + git cat-file blob branch:newdir/exec.sh >actual &&
573 + test_cmp expect actual
574 +'
575
576 ###
577 ### series E
@@ -588,11 +589,11 @@ from refs/heads/branch^0
589
590 INPUT_END
591 test_expect_success 'E: rfc2822 date, --date-format=raw' '
591 - test_must_fail git fast-import --date-format=raw <input
592 + test_must_fail git fast-import --date-format=raw <input
593 +'
594 +test_expect_success 'E: rfc2822 date, --date-format=rfc2822' '
595 + git fast-import --date-format=rfc2822 <input
596 '
593 -test_expect_success \
594 - 'E: rfc2822 date, --date-format=rfc2822' \
595 - 'git fast-import --date-format=rfc2822 <input'
597
598 test_expect_success 'E: verify pack' '
599 verify_packs
@@ -604,10 +605,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1170783302 -0500
605
606 RFC 2822 type date
607 EOF
607 -test_expect_success \
608 - 'E: verify commit' \
609 - 'git cat-file commit branch | sed 1,2d >actual &&
610 - test_cmp expect actual'
608 +test_expect_success 'E: verify commit' '
609 + git cat-file commit branch | sed 1,2d >actual &&
610 + test_cmp expect actual
611 +'
612
613 ###
614 ### series F
@@ -628,13 +629,12 @@ reset refs/heads/other
629 from refs/heads/branch
630
631 INPUT_END
631 -test_expect_success \
632 - 'F: non-fast-forward update skips' \
633 - 'if git fast-import <input
634 - then
632 +test_expect_success 'F: non-fast-forward update skips' '
633 + if git fast-import <input
634 + then
635 echo BAD gfi did not fail
636 return 1
637 - else
637 + else
638 if test $old_branch = `git rev-parse --verify branch^0`
639 then
640 : branch unaffected and failure returned
@@ -643,8 +643,8 @@ test_expect_success \
643 echo BAD gfi changed branch $old_branch
644 return 1
645 fi
646 - fi
647 - '
646 + fi
647 +'
648
649 test_expect_success 'F: verify pack' '
650 verify_packs
@@ -658,10 +658,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
658
659 losing things already?
660 EOF
661 -test_expect_success \
662 - 'F: verify other commit' \
663 - 'git cat-file commit other >actual &&
664 - test_cmp expect actual'
661 +test_expect_success 'F: verify other commit' '
662 + git cat-file commit other >actual &&
663 + test_cmp expect actual
664 +'
665
666 ###
667 ### series G
@@ -679,18 +679,18 @@ COMMIT
679 from refs/heads/branch~1
680
681 INPUT_END
682 -test_expect_success \
683 - 'G: non-fast-forward update forced' \
684 - 'git fast-import --force <input'
682 +test_expect_success 'G: non-fast-forward update forced' '
683 + git fast-import --force <input
684 +'
685
686 test_expect_success 'G: verify pack' '
687 verify_packs
688 '
689
690 -test_expect_success \
691 - 'G: branch changed, but logged' \
692 - 'test $old_branch != `git rev-parse --verify branch^0` &&
693 - test $old_branch = `git rev-parse --verify branch@{1}`'
690 +test_expect_success 'G: branch changed, but logged' '
691 + test $old_branch != `git rev-parse --verify branch^0` &&
692 + test $old_branch = `git rev-parse --verify branch@{1}`
693 +'
694
695 ###
696 ### series H
@@ -717,10 +717,10 @@ $file5_data
717 EOF
718
719 INPUT_END
720 -test_expect_success \
721 - 'H: deletall, add 1' \
722 - 'git fast-import <input &&
723 - git whatchanged H'
720 +test_expect_success 'H: deletall, add 1' '
721 + git fast-import <input &&
722 + git whatchanged H
723 +'
724
725 test_expect_success 'H: verify pack' '
726 verify_packs
@@ -734,15 +734,15 @@ cat >expect <<EOF
734 :100755 000000 e74b7d465e52746be2b4bae983670711e6e66657 0000000000000000000000000000000000000000 D newdir/exec.sh
735 EOF
736 git diff-tree -M -r H^ H >actual
737 -test_expect_success \
738 - 'H: validate old files removed, new files added' \
739 - 'compare_diff_raw expect actual'
737 +test_expect_success 'H: validate old files removed, new files added' '
738 + compare_diff_raw expect actual
739 +'
740
741 echo "$file5_data" >expect
742 -test_expect_success \
743 - 'H: verify file' \
744 - 'git cat-file blob H:h/e/l/lo >actual &&
745 - test_cmp expect actual'
742 +test_expect_success 'H: verify file' '
743 + git cat-file blob H:h/e/l/lo >actual &&
744 + test_cmp expect actual
745 +'
746
747 ###
748 ### series I
@@ -758,17 +758,17 @@ COMMIT
758 from refs/heads/branch
759
760 INPUT_END
761 -test_expect_success \
762 - 'I: export-pack-edges' \
763 - 'git fast-import --export-pack-edges=edges.list <input'
761 +test_expect_success 'I: export-pack-edges' '
762 + git fast-import --export-pack-edges=edges.list <input
763 +'
764
765 cat >expect <<EOF
766 .git/objects/pack/pack-.pack: `git rev-parse --verify export-boundary`
767 EOF
768 -test_expect_success \
769 - 'I: verify edge list' \
770 - 'sed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&
771 - test_cmp expect actual'
768 +test_expect_success 'I: verify edge list' '
769 + sed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&
770 + test_cmp expect actual
771 +'
772
773 ###
774 ### series J
@@ -792,13 +792,13 @@ initialize J
792 COMMIT
793
794 INPUT_END
795 -test_expect_success \
796 - 'J: reset existing branch creates empty commit' \
797 - 'git fast-import <input'
798 -test_expect_success \
799 - 'J: branch has 1 commit, empty tree' \
800 - 'test 1 = `git rev-list J | wc -l` &&
801 - test 0 = `git ls-tree J | wc -l`'
795 +test_expect_success 'J: reset existing branch creates empty commit' '
796 + git fast-import <input
797 +'
798 +test_expect_success 'J: branch has 1 commit, empty tree' '
799 + test 1 = `git rev-list J | wc -l` &&
800 + test 0 = `git ls-tree J | wc -l`
801 +'
802
803 cat >input <<INPUT_END
804 reset refs/heads/J2
@@ -809,9 +809,9 @@ data <<EOF
809 Tag branch that was reset.
810 EOF
811 INPUT_END
812 -test_expect_success \
813 - 'J: tag must fail on empty branch' \
814 - 'test_must_fail git fast-import <input'
812 +test_expect_success 'J: tag must fail on empty branch' '
813 + test_must_fail git fast-import <input
814 +'
815 ###
816 ### series K
817 ###
@@ -834,13 +834,13 @@ COMMIT
834 from refs/heads/branch^1
835
836 INPUT_END
837 -test_expect_success \
838 - 'K: reinit branch with from' \
839 - 'git fast-import <input'
840 -test_expect_success \
841 - 'K: verify K^1 = branch^1' \
842 - 'test `git rev-parse --verify branch^1` \
843 - = `git rev-parse --verify K^1`'
837 +test_expect_success 'K: reinit branch with from' '
838 + git fast-import <input
839 +'
840 +test_expect_success 'K: verify K^1 = branch^1' '
841 + test `git rev-parse --verify branch^1` \
842 + = `git rev-parse --verify K^1`
843 +'
844
845 ###
846 ### series L
@@ -886,11 +886,11 @@ cat >expect <<EXPECT_END
886 :100644 100644 4268632... 55d3a52... M ba
887 EXPECT_END
888
889 -test_expect_success \
890 - 'L: verify internal tree sorting' \
891 - 'git fast-import <input &&
892 - git diff-tree --abbrev --raw L^ L >output &&
893 - test_cmp expect output'
889 +test_expect_success 'L: verify internal tree sorting' '
890 + git fast-import <input &&
891 + git diff-tree --abbrev --raw L^ L >output &&
892 + test_cmp expect output
893 +'
894
895 cat >input <<INPUT_END
896 blob
@@ -923,13 +923,13 @@ g/b/f
923 g/b/h
924 EOF
925
926 -test_expect_success \
927 - 'L: nested tree copy does not corrupt deltas' \
928 - 'git fast-import <input &&
926 +test_expect_success 'L: nested tree copy does not corrupt deltas' '
927 + git fast-import <input &&
928 git ls-tree L2 g/b/ >tmp &&
929 cat tmp | cut -f 2 >actual &&
930 test_cmp expect actual &&
932 - git fsck `git rev-parse L2`'
931 + git fsck `git rev-parse L2`
932 +'
933
934 git update-ref -d refs/heads/L2
935
@@ -953,11 +953,11 @@ INPUT_END
953 cat >expect <<EOF
954 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100 file2/newf file2/n.e.w.f
955 EOF
956 -test_expect_success \
957 - 'M: rename file in same subdirectory' \
958 - 'git fast-import <input &&
959 - git diff-tree -M -r M1^ M1 >actual &&
960 - compare_diff_raw expect actual'
956 +test_expect_success 'M: rename file in same subdirectory' '
957 + git fast-import <input &&
958 + git diff-tree -M -r M1^ M1 >actual &&
959 + compare_diff_raw expect actual
960 +'
961
962 cat >input <<INPUT_END
963 commit refs/heads/M2
@@ -974,11 +974,11 @@ INPUT_END
974 cat >expect <<EOF
975 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100 file2/newf i/am/new/to/you
976 EOF
977 -test_expect_success \
978 - 'M: rename file to new subdirectory' \
979 - 'git fast-import <input &&
980 - git diff-tree -M -r M2^ M2 >actual &&
981 - compare_diff_raw expect actual'
977 +test_expect_success 'M: rename file to new subdirectory' '
978 + git fast-import <input &&
979 + git diff-tree -M -r M2^ M2 >actual &&
980 + compare_diff_raw expect actual
981 +'
982
983 cat >input <<INPUT_END
984 commit refs/heads/M3
@@ -995,11 +995,11 @@ INPUT_END
995 cat >expect <<EOF
996 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100 i/am/new/to/you other/sub/am/new/to/you
997 EOF
998 -test_expect_success \
999 - 'M: rename subdirectory to new subdirectory' \
1000 - 'git fast-import <input &&
1001 - git diff-tree -M -r M3^ M3 >actual &&
1002 - compare_diff_raw expect actual'
998 +test_expect_success 'M: rename subdirectory to new subdirectory' '
999 + git fast-import <input &&
1000 + git diff-tree -M -r M3^ M3 >actual &&
1001 + compare_diff_raw expect actual
1002 +'
1003
1004 cat >input <<INPUT_END
1005 commit refs/heads/M4
@@ -1020,12 +1020,12 @@ cat >expect <<EOF
1020 :100755 100755 e74b7d465e52746be2b4bae983670711e6e66657 e74b7d465e52746be2b4bae983670711e6e66657 R100 newdir/exec.sh sub/newdir/exec.sh
1021 :100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 R100 newdir/interesting sub/newdir/interesting
1022 EOF
1023 -test_expect_success \
1024 - 'M: rename root to subdirectory' \
1025 - 'git fast-import <input &&
1026 - git diff-tree -M -r M4^ M4 >actual &&
1027 - cat actual &&
1028 - compare_diff_raw expect actual'
1023 +test_expect_success 'M: rename root to subdirectory' '
1024 + git fast-import <input &&
1025 + git diff-tree -M -r M4^ M4 >actual &&
1026 + cat actual &&
1027 + compare_diff_raw expect actual
1028 +'
1029
1030 ###
1031 ### series N
@@ -1047,11 +1047,11 @@ INPUT_END
1047 cat >expect <<EOF
1048 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf file2/n.e.w.f
1049 EOF
1050 -test_expect_success \
1051 - 'N: copy file in same subdirectory' \
1052 - 'git fast-import <input &&
1053 - git diff-tree -C --find-copies-harder -r N1^ N1 >actual &&
1054 - compare_diff_raw expect actual'
1050 +test_expect_success 'N: copy file in same subdirectory' '
1051 + git fast-import <input &&
1052 + git diff-tree -C --find-copies-harder -r N1^ N1 >actual &&
1053 + compare_diff_raw expect actual
1054 +'
1055
1056 cat >input <<INPUT_END
1057 commit refs/heads/N2
@@ -1081,11 +1081,11 @@ cat >expect <<EOF
1081 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf file3/newf
1082 :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100 file2/oldf file3/oldf
1083 EOF
1084 -test_expect_success \
1085 - 'N: copy then modify subdirectory' \
1086 - 'git fast-import <input &&
1087 - git diff-tree -C --find-copies-harder -r N2^^ N2 >actual &&
1088 - compare_diff_raw expect actual'
1084 +test_expect_success 'N: copy then modify subdirectory' '
1085 + git fast-import <input &&
1086 + git diff-tree -C --find-copies-harder -r N2^^ N2 >actual &&
1087 + compare_diff_raw expect actual
1088 +'
1089
1090 cat >input <<INPUT_END
1091 commit refs/heads/N3
@@ -1105,19 +1105,18 @@ D file2/file5
1105
1106 INPUT_END
1107
1108 -test_expect_success \
1109 - 'N: copy dirty subdirectory' \
1110 - 'git fast-import <input &&
1111 - test `git rev-parse N2^{tree}` = `git rev-parse N3^{tree}`'
1108 +test_expect_success 'N: copy dirty subdirectory' '
1109 + git fast-import <input &&
1110 + test `git rev-parse N2^{tree}` = `git rev-parse N3^{tree}`
1111 +'
1112
1113 -test_expect_success \
1114 - 'N: copy directory by id' \
1115 - 'cat >expect <<-\EOF &&
1113 +test_expect_success 'N: copy directory by id' '
1114 + cat >expect <<-\EOF &&
1115 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf file3/newf
1116 :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100 file2/oldf file3/oldf
1117 EOF
1119 - subdir=$(git rev-parse refs/heads/branch^0:file2) &&
1120 - cat >input <<-INPUT_END &&
1118 + subdir=$(git rev-parse refs/heads/branch^0:file2) &&
1119 + cat >input <<-INPUT_END &&
1120 commit refs/heads/N4
1121 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1122 data <<COMMIT
@@ -1127,9 +1126,10 @@ test_expect_success \
1126 from refs/heads/branch^0
1127 M 040000 $subdir file3
1128 INPUT_END
1130 - git fast-import <input &&
1131 - git diff-tree -C --find-copies-harder -r N4^ N4 >actual &&
1132 - compare_diff_raw expect actual'
1129 + git fast-import <input &&
1130 + git diff-tree -C --find-copies-harder -r N4^ N4 >actual &&
1131 + compare_diff_raw expect actual
1132 +'
1133
1134 test_expect_success PIPE 'N: read and copy directory' '
1135 cat >expect <<-\EOF &&
@@ -1202,14 +1202,13 @@ test_expect_success PIPE 'N: empty directory reads as missing' '
1202 test_cmp expect actual
1203 '
1204
1205 -test_expect_success \
1206 - 'N: copy root directory by tree hash' \
1207 - 'cat >expect <<-\EOF &&
1205 +test_expect_success 'N: copy root directory by tree hash' '
1206 + cat >expect <<-\EOF &&
1207 :100755 000000 f1fb5da718392694d0076d677d6d0e364c79b0bc 0000000000000000000000000000000000000000 D file3/newf
1208 :100644 000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 0000000000000000000000000000000000000000 D file3/oldf
1209 EOF
1211 - root=$(git rev-parse refs/heads/branch^0^{tree}) &&
1212 - cat >input <<-INPUT_END &&
1210 + root=$(git rev-parse refs/heads/branch^0^{tree}) &&
1211 + cat >input <<-INPUT_END &&
1212 commit refs/heads/N6
1213 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1214 data <<COMMIT
@@ -1219,20 +1218,20 @@ test_expect_success \
1218 from refs/heads/branch^0
1219 M 040000 $root ""
1220 INPUT_END
1222 - git fast-import <input &&
1223 - git diff-tree -C --find-copies-harder -r N4 N6 >actual &&
1224 - compare_diff_raw expect actual'
1221 + git fast-import <input &&
1222 + git diff-tree -C --find-copies-harder -r N4 N6 >actual &&
1223 + compare_diff_raw expect actual
1224 +'
1225
1226 -test_expect_success \
1227 - 'N: copy root by path' \
1228 - 'cat >expect <<-\EOF &&
1226 +test_expect_success 'N: copy root by path' '
1227 + cat >expect <<-\EOF &&
1228 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf oldroot/file2/newf
1229 :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100 file2/oldf oldroot/file2/oldf
1230 :100755 100755 85df50785d62d3b05ab03d9cbf7e4a0b49449730 85df50785d62d3b05ab03d9cbf7e4a0b49449730 C100 file4 oldroot/file4
1231 :100755 100755 e74b7d465e52746be2b4bae983670711e6e66657 e74b7d465e52746be2b4bae983670711e6e66657 C100 newdir/exec.sh oldroot/newdir/exec.sh
1232 :100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100 newdir/interesting oldroot/newdir/interesting
1233 EOF
1235 - cat >input <<-INPUT_END &&
1234 + cat >input <<-INPUT_END &&
1235 commit refs/heads/N-copy-root-path
1236 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1237 data <<COMMIT
@@ -1242,21 +1241,21 @@ test_expect_success \
1241 from refs/heads/branch^0
1242 C "" oldroot
1243 INPUT_END
1245 - git fast-import <input &&
1246 - git diff-tree -C --find-copies-harder -r branch N-copy-root-path >actual &&
1247 - compare_diff_raw expect actual'
1244 + git fast-import <input &&
1245 + git diff-tree -C --find-copies-harder -r branch N-copy-root-path >actual &&
1246 + compare_diff_raw expect actual
1247 +'
1248
1249 -test_expect_success \
1250 - 'N: delete directory by copying' \
1251 - 'cat >expect <<-\EOF &&
1249 +test_expect_success 'N: delete directory by copying' '
1250 + cat >expect <<-\EOF &&
1251 OBJID
1252 :100644 000000 OBJID OBJID D foo/bar/qux
1253 OBJID
1254 :000000 100644 OBJID OBJID A foo/bar/baz
1255 :000000 100644 OBJID OBJID A foo/bar/qux
1256 EOF
1258 - empty_tree=$(git mktree </dev/null) &&
1259 - cat >input <<-INPUT_END &&
1257 + empty_tree=$(git mktree </dev/null) &&
1258 + cat >input <<-INPUT_END &&
1259 commit refs/heads/N-delete
1260 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1261 data <<COMMIT
@@ -1282,21 +1281,21 @@ test_expect_success \
1281
1282 M 040000 $empty_tree foo/bar/qux
1283 INPUT_END
1285 - git fast-import <input &&
1286 - git rev-list N-delete |
1284 + git fast-import <input &&
1285 + git rev-list N-delete |
1286 git diff-tree -r --stdin --root --always |
1287 sed -e "s/$_x40/OBJID/g" >actual &&
1289 - test_cmp expect actual'
1288 + test_cmp expect actual
1289 +'
1290
1291 -test_expect_success \
1292 - 'N: modify copied tree' \
1293 - 'cat >expect <<-\EOF &&
1291 +test_expect_success 'N: modify copied tree' '
1292 + cat >expect <<-\EOF &&
1293 :100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100 newdir/interesting file3/file5
1294 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf file3/newf
1295 :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100 file2/oldf file3/oldf
1296 EOF
1298 - subdir=$(git rev-parse refs/heads/branch^0:file2) &&
1299 - cat >input <<-INPUT_END &&
1297 + subdir=$(git rev-parse refs/heads/branch^0:file2) &&
1298 + cat >input <<-INPUT_END &&
1299 commit refs/heads/N5
1300 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1301 data <<COMMIT
@@ -1317,14 +1316,14 @@ test_expect_success \
1316 $file5_data
1317 EOF
1318 INPUT_END
1320 - git fast-import <input &&
1321 - git diff-tree -C --find-copies-harder -r N5^^ N5 >actual &&
1322 - compare_diff_raw expect actual'
1323 -
1324 -test_expect_success \
1325 - 'N: reject foo/ syntax' \
1326 - 'subdir=$(git rev-parse refs/heads/branch^0:file2) &&
1327 - test_must_fail git fast-import <<-INPUT_END
1319 + git fast-import <input &&
1320 + git diff-tree -C --find-copies-harder -r N5^^ N5 >actual &&
1321 + compare_diff_raw expect actual
1322 +'
1323 +
1324 +test_expect_success 'N: reject foo/ syntax' '
1325 + subdir=$(git rev-parse refs/heads/branch^0:file2) &&
1326 + test_must_fail git fast-import <<-INPUT_END
1327 commit refs/heads/N5B
1328 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1329 data <<COMMIT
@@ -1333,11 +1332,11 @@ test_expect_success \
1332
1333 from refs/heads/branch^0
1334 M 040000 $subdir file3/
1336 - INPUT_END'
1335 + INPUT_END
1336 +'
1337
1338 -test_expect_success \
1339 - 'N: reject foo/ syntax in copy source' \
1340 - 'test_must_fail git fast-import <<-INPUT_END
1338 +test_expect_success 'N: reject foo/ syntax in copy source' '
1339 + test_must_fail git fast-import <<-INPUT_END
1340 commit refs/heads/N5C
1341 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1342 data <<COMMIT
@@ -1346,11 +1345,11 @@ test_expect_success \
1345
1346 from refs/heads/branch^0
1347 C file2/ file3
1349 - INPUT_END'
1348 + INPUT_END
1349 +'
1350
1351 -test_expect_success \
1352 - 'N: reject foo/ syntax in rename source' \
1353 - 'test_must_fail git fast-import <<-INPUT_END
1351 +test_expect_success 'N: reject foo/ syntax in rename source' '
1352 + test_must_fail git fast-import <<-INPUT_END
1353 commit refs/heads/N5D
1354 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1355 data <<COMMIT
@@ -1359,11 +1358,11 @@ test_expect_success \
1358
1359 from refs/heads/branch^0
1360 R file2/ file3
1362 - INPUT_END'
1361 + INPUT_END
1362 +'
1363
1364 -test_expect_success \
1365 - 'N: reject foo/ syntax in ls argument' \
1366 - 'test_must_fail git fast-import <<-INPUT_END
1364 +test_expect_success 'N: reject foo/ syntax in ls argument' '
1365 + test_must_fail git fast-import <<-INPUT_END
1366 commit refs/heads/N5E
1367 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1368 data <<COMMIT
@@ -1372,13 +1371,13 @@ test_expect_success \
1371
1372 from refs/heads/branch^0
1373 ls "file2/"
1375 - INPUT_END'
1374 + INPUT_END
1375 +'
1376
1377 -test_expect_success \
1378 - 'N: copy to root by id and modify' \
1379 - 'echo "hello, world" >expect.foo &&
1380 - echo hello >expect.bar &&
1381 - git fast-import <<-SETUP_END &&
1377 +test_expect_success 'N: copy to root by id and modify' '
1378 + echo "hello, world" >expect.foo &&
1379 + echo hello >expect.bar &&
1380 + git fast-import <<-SETUP_END &&
1381 commit refs/heads/N7
1382 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1383 data <<COMMIT
@@ -1392,8 +1391,8 @@ test_expect_success \
1391 EOF
1392 SETUP_END
1393
1395 - tree=$(git rev-parse --verify N7:) &&
1396 - git fast-import <<-INPUT_END &&
1394 + tree=$(git rev-parse --verify N7:) &&
1395 + git fast-import <<-INPUT_END &&
1396 commit refs/heads/N8
1397 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1398 data <<COMMIT
@@ -1406,15 +1405,15 @@ test_expect_success \
1405 hello, world
1406 EOF
1407 INPUT_END
1409 - git show N8:foo/foo >actual.foo &&
1410 - git show N8:foo/bar >actual.bar &&
1411 - test_cmp expect.foo actual.foo &&
1412 - test_cmp expect.bar actual.bar'
1413 -
1414 -test_expect_success \
1415 - 'N: extract subtree' \
1416 - 'branch=$(git rev-parse --verify refs/heads/branch^{tree}) &&
1417 - cat >input <<-INPUT_END &&
1408 + git show N8:foo/foo >actual.foo &&
1409 + git show N8:foo/bar >actual.bar &&
1410 + test_cmp expect.foo actual.foo &&
1411 + test_cmp expect.bar actual.bar
1412 +'
1413 +
1414 +test_expect_success 'N: extract subtree' '
1415 + branch=$(git rev-parse --verify refs/heads/branch^{tree}) &&
1416 + cat >input <<-INPUT_END &&
1417 commit refs/heads/N9
1418 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1419 data <<COMMIT
@@ -1424,14 +1423,14 @@ test_expect_success \
1423 M 040000 $branch ""
1424 C "newdir" ""
1425 INPUT_END
1427 - git fast-import <input &&
1428 - git diff --exit-code branch:newdir N9'
1429 -
1430 -test_expect_success \
1431 - 'N: modify subtree, extract it, and modify again' \
1432 - 'echo hello >expect.baz &&
1433 - echo hello, world >expect.qux &&
1434 - git fast-import <<-SETUP_END &&
1426 + git fast-import <input &&
1427 + git diff --exit-code branch:newdir N9
1428 +'
1429 +
1430 +test_expect_success 'N: modify subtree, extract it, and modify again' '
1431 + echo hello >expect.baz &&
1432 + echo hello, world >expect.qux &&
1433 + git fast-import <<-SETUP_END &&
1434 commit refs/heads/N10
1435 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1436 data <<COMMIT
@@ -1445,8 +1444,8 @@ test_expect_success \
1444 EOF
1445 SETUP_END
1446
1448 - tree=$(git rev-parse --verify N10:) &&
1449 - git fast-import <<-INPUT_END &&
1447 + tree=$(git rev-parse --verify N10:) &&
1448 + git fast-import <<-INPUT_END &&
1449 commit refs/heads/N11
1450 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1451 data <<COMMIT
@@ -1461,12 +1460,12 @@ test_expect_success \
1460 R "foo" ""
1461 C "bar/qux" "bar/quux"
1462 INPUT_END
1464 - git show N11:bar/baz >actual.baz &&
1465 - git show N11:bar/qux >actual.qux &&
1466 - git show N11:bar/quux >actual.quux &&
1467 - test_cmp expect.baz actual.baz &&
1468 - test_cmp expect.qux actual.qux &&
1469 - test_cmp expect.qux actual.quux'
1463 + git show N11:bar/baz >actual.baz &&
1464 + git show N11:bar/qux >actual.qux &&
1465 + git show N11:bar/quux >actual.quux &&
1466 + test_cmp expect.baz actual.baz &&
1467 + test_cmp expect.qux actual.qux &&
1468 + test_cmp expect.qux actual.quux'
1469
1470 ###
1471 ### series O
@@ -1503,10 +1502,10 @@ D file2/file5
1502
1503 INPUT_END
1504
1506 -test_expect_success \
1507 - 'O: comments are all skipped' \
1508 - 'git fast-import <input &&
1509 - test `git rev-parse N3` = `git rev-parse O1`'
1505 +test_expect_success 'O: comments are all skipped' '
1506 + git fast-import <input &&
1507 + test `git rev-parse N3` = `git rev-parse O1`
1508 +'
1509
1510 cat >input <<INPUT_END
1511 commit refs/heads/O2
@@ -1524,14 +1523,14 @@ D file2/file5
1523
1524 INPUT_END
1525
1527 -test_expect_success \
1528 - 'O: blank lines not necessary after data commands' \
1529 - 'git fast-import <input &&
1530 - test `git rev-parse N3` = `git rev-parse O2`'
1526 +test_expect_success 'O: blank lines not necessary after data commands' '
1527 + git fast-import <input &&
1528 + test `git rev-parse N3` = `git rev-parse O2`
1529 +'
1530
1532 -test_expect_success \
1533 - 'O: repack before next test' \
1534 - 'git repack -a -d'
1531 +test_expect_success 'O: repack before next test' '
1532 + git repack -a -d
1533 +'
1534
1535 cat >input <<INPUT_END
1536 commit refs/heads/O3
@@ -1569,13 +1568,13 @@ of
1568 empty
1569 commits
1570 INPUT_END
1572 -test_expect_success \
1573 - 'O: blank lines not necessary after other commands' \
1574 - 'git fast-import <input &&
1575 - test 8 = `find .git/objects/pack -type f | wc -l` &&
1576 - test `git rev-parse refs/tags/O3-2nd` = `git rev-parse O3^` &&
1577 - git log --reverse --pretty=oneline O3 | sed s/^.*z// >actual &&
1578 - test_cmp expect actual'
1571 +test_expect_success 'O: blank lines not necessary after other commands' '
1572 + git fast-import <input &&
1573 + test 8 = `find .git/objects/pack -type f | wc -l` &&
1574 + test `git rev-parse refs/tags/O3-2nd` = `git rev-parse O3^` &&
1575 + git log --reverse --pretty=oneline O3 | sed s/^.*z// >actual &&
1576 + test_cmp expect actual
1577 +'
1578
1579 cat >input <<INPUT_END
1580 commit refs/heads/O4
@@ -1602,11 +1601,11 @@ zcommits
1601 COMMIT
1602 progress I'm done!
1603 INPUT_END
1605 -test_expect_success \
1606 - 'O: progress outputs as requested by input' \
1607 - 'git fast-import <input >actual &&
1608 - grep "progress " <input >expect &&
1609 - test_cmp expect actual'
1604 +test_expect_success 'O: progress outputs as requested by input' '
1605 + git fast-import <input >actual &&
1606 + grep "progress " <input >expect &&
1607 + test_cmp expect actual
1608 +'
1609
1610 ###
1611 ### series P (gitlinks)
@@ -1667,16 +1666,16 @@ M 160000 :6 sub
1666
1667 INPUT_END
1668
1670 -test_expect_success \
1671 - 'P: superproject & submodule mix' \
1672 - 'git fast-import <input &&
1673 - git checkout subuse1 &&
1674 - rm -rf sub && mkdir sub && (cd sub &&
1675 - git init &&
1676 - git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&
1677 - git checkout master) &&
1678 - git submodule init &&
1679 - git submodule update'
1669 +test_expect_success 'P: superproject & submodule mix' '
1670 + git fast-import <input &&
1671 + git checkout subuse1 &&
1672 + rm -rf sub && mkdir sub && (cd sub &&
1673 + git init &&
1674 + git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&
1675 + git checkout master) &&
1676 + git submodule init &&
1677 + git submodule update
1678 +'
1679
1680 SUBLAST=$(git rev-parse --verify sub)
1681 SUBPREV=$(git rev-parse --verify sub^)
@@ -1709,12 +1708,12 @@ M 160000 $SUBLAST sub
1708
1709 INPUT_END
1710
1712 -test_expect_success \
1713 - 'P: verbatim SHA gitlinks' \
1714 - 'git branch -D sub &&
1715 - git gc && git prune &&
1716 - git fast-import <input &&
1717 - test $(git rev-parse --verify subuse2) = $(git rev-parse --verify subuse1)'
1711 +test_expect_success 'P: verbatim SHA gitlinks' '
1712 + git branch -D sub &&
1713 + git gc && git prune &&
1714 + git fast-import <input &&
1715 + test $(git rev-parse --verify subuse2) = $(git rev-parse --verify subuse1)
1716 +'
1717
1718 test_tick
1719 cat >input <<INPUT_END
@@ -1734,7 +1733,8 @@ DATA
1733 INPUT_END
1734
1735 test_expect_success 'P: fail on inline gitlink' '
1737 - test_must_fail git fast-import <input'
1736 + test_must_fail git fast-import <input
1737 +'
1738
1739 test_tick
1740 cat >input <<INPUT_END
@@ -1757,7 +1757,8 @@ M 160000 :1 sub
1757 INPUT_END
1758
1759 test_expect_success 'P: fail on blob mark in gitlink' '
1760 - test_must_fail git fast-import <input'
1760 + test_must_fail git fast-import <input
1761 +'
1762
1763 ###
1764 ### series Q (notes)
@@ -1882,10 +1883,10 @@ EOF
1883
1884 INPUT_END
1885
1885 -test_expect_success \
1886 - 'Q: commit notes' \
1887 - 'git fast-import <input &&
1888 - git whatchanged notes-test'
1886 +test_expect_success 'Q: commit notes' '
1887 + git fast-import <input &&
1888 + git whatchanged notes-test
1889 +'
1890
1891 test_expect_success 'Q: verify pack' '
1892 verify_packs
@@ -1901,10 +1902,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1902
1903 first (:3)
1904 EOF
1904 -test_expect_success \
1905 - 'Q: verify first commit' \
1906 - 'git cat-file commit notes-test~2 | sed 1d >actual &&
1907 - test_cmp expect actual'
1905 +test_expect_success 'Q: verify first commit' '
1906 + git cat-file commit notes-test~2 | sed 1d >actual &&
1907 + test_cmp expect actual
1908 +'
1909
1910 cat >expect <<EOF
1911 parent $commit1
@@ -1913,10 +1914,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1914
1915 second (:5)
1916 EOF
1916 -test_expect_success \
1917 - 'Q: verify second commit' \
1918 - 'git cat-file commit notes-test^ | sed 1d >actual &&
1919 - test_cmp expect actual'
1917 +test_expect_success 'Q: verify second commit' '
1918 + git cat-file commit notes-test^ | sed 1d >actual &&
1919 + test_cmp expect actual
1920 +'
1921
1922 cat >expect <<EOF
1923 parent $commit2
@@ -1925,10 +1926,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1926
1927 third (:6)
1928 EOF
1928 -test_expect_success \
1929 - 'Q: verify third commit' \
1930 - 'git cat-file commit notes-test | sed 1d >actual &&
1931 - test_cmp expect actual'
1929 +test_expect_success 'Q: verify third commit' '
1930 + git cat-file commit notes-test | sed 1d >actual &&
1931 + test_cmp expect actual
1932 +'
1933
1934 cat >expect <<EOF
1935 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -1936,10 +1937,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1937
1938 notes (:9)
1939 EOF
1939 -test_expect_success \
1940 - 'Q: verify first notes commit' \
1941 - 'git cat-file commit refs/notes/foobar~2 | sed 1d >actual &&
1942 - test_cmp expect actual'
1940 +test_expect_success 'Q: verify first notes commit' '
1941 + git cat-file commit refs/notes/foobar~2 | sed 1d >actual &&
1942 + test_cmp expect actual
1943 +'
1944
1945 cat >expect.unsorted <<EOF
1946 100644 blob $commit1
@@ -1947,25 +1948,25 @@ cat >expect.unsorted <<EOF
1948 100644 blob $commit3
1949 EOF
1950 cat expect.unsorted | sort >expect
1950 -test_expect_success \
1951 - 'Q: verify first notes tree' \
1952 - 'git cat-file -p refs/notes/foobar~2^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
1953 - test_cmp expect actual'
1951 +test_expect_success 'Q: verify first notes tree' '
1952 + git cat-file -p refs/notes/foobar~2^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
1953 + test_cmp expect actual
1954 +'
1955
1956 echo "$note1_data" >expect
1956 -test_expect_success \
1957 - 'Q: verify first note for first commit' \
1958 - 'git cat-file blob refs/notes/foobar~2:$commit1 >actual && test_cmp expect actual'
1957 +test_expect_success 'Q: verify first note for first commit' '
1958 + git cat-file blob refs/notes/foobar~2:$commit1 >actual && test_cmp expect actual
1959 +'
1960
1961 echo "$note2_data" >expect
1961 -test_expect_success \
1962 - 'Q: verify first note for second commit' \
1963 - 'git cat-file blob refs/notes/foobar~2:$commit2 >actual && test_cmp expect actual'
1962 +test_expect_success 'Q: verify first note for second commit' '
1963 + git cat-file blob refs/notes/foobar~2:$commit2 >actual && test_cmp expect actual
1964 +'
1965
1966 echo "$note3_data" >expect
1966 -test_expect_success \
1967 - 'Q: verify first note for third commit' \
1968 - 'git cat-file blob refs/notes/foobar~2:$commit3 >actual && test_cmp expect actual'
1967 +test_expect_success 'Q: verify first note for third commit' '
1968 + git cat-file blob refs/notes/foobar~2:$commit3 >actual && test_cmp expect actual
1969 +'
1970
1971 cat >expect <<EOF
1972 parent `git rev-parse --verify refs/notes/foobar~2`
@@ -1974,10 +1975,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
1975
1976 notes (:10)
1977 EOF
1977 -test_expect_success \
1978 - 'Q: verify second notes commit' \
1979 - 'git cat-file commit refs/notes/foobar^ | sed 1d >actual &&
1980 - test_cmp expect actual'
1978 +test_expect_success 'Q: verify second notes commit' '
1979 + git cat-file commit refs/notes/foobar^ | sed 1d >actual &&
1980 + test_cmp expect actual
1981 +'
1982
1983 cat >expect.unsorted <<EOF
1984 100644 blob $commit1
@@ -1985,25 +1986,25 @@ cat >expect.unsorted <<EOF
1986 100644 blob $commit3
1987 EOF
1988 cat expect.unsorted | sort >expect
1988 -test_expect_success \
1989 - 'Q: verify second notes tree' \
1990 - 'git cat-file -p refs/notes/foobar^^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
1991 - test_cmp expect actual'
1989 +test_expect_success 'Q: verify second notes tree' '
1990 + git cat-file -p refs/notes/foobar^^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
1991 + test_cmp expect actual
1992 +'
1993
1994 echo "$note1b_data" >expect
1994 -test_expect_success \
1995 - 'Q: verify second note for first commit' \
1996 - 'git cat-file blob refs/notes/foobar^:$commit1 >actual && test_cmp expect actual'
1995 +test_expect_success 'Q: verify second note for first commit' '
1996 + git cat-file blob refs/notes/foobar^:$commit1 >actual && test_cmp expect actual
1997 +'
1998
1999 echo "$note2_data" >expect
1999 -test_expect_success \
2000 - 'Q: verify first note for second commit' \
2001 - 'git cat-file blob refs/notes/foobar^:$commit2 >actual && test_cmp expect actual'
2000 +test_expect_success 'Q: verify first note for second commit' '
2001 + git cat-file blob refs/notes/foobar^:$commit2 >actual && test_cmp expect actual
2002 +'
2003
2004 echo "$note3_data" >expect
2004 -test_expect_success \
2005 - 'Q: verify first note for third commit' \
2006 - 'git cat-file blob refs/notes/foobar^:$commit3 >actual && test_cmp expect actual'
2005 +test_expect_success 'Q: verify first note for third commit' '
2006 + git cat-file blob refs/notes/foobar^:$commit3 >actual && test_cmp expect actual
2007 +'
2008
2009 cat >expect <<EOF
2010 author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -2011,24 +2012,24 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
2012
2013 notes (:11)
2014 EOF
2014 -test_expect_success \
2015 - 'Q: verify third notes commit' \
2016 - 'git cat-file commit refs/notes/foobar2 | sed 1d >actual &&
2017 - test_cmp expect actual'
2015 +test_expect_success 'Q: verify third notes commit' '
2016 + git cat-file commit refs/notes/foobar2 | sed 1d >actual &&
2017 + test_cmp expect actual
2018 +'
2019
2020 cat >expect.unsorted <<EOF
2021 100644 blob $commit1
2022 EOF
2023 cat expect.unsorted | sort >expect
2023 -test_expect_success \
2024 - 'Q: verify third notes tree' \
2025 - 'git cat-file -p refs/notes/foobar2^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
2026 - test_cmp expect actual'
2024 +test_expect_success 'Q: verify third notes tree' '
2025 + git cat-file -p refs/notes/foobar2^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
2026 + test_cmp expect actual
2027 +'
2028
2029 echo "$note1c_data" >expect
2029 -test_expect_success \
2030 - 'Q: verify third note for first commit' \
2031 - 'git cat-file blob refs/notes/foobar2:$commit1 >actual && test_cmp expect actual'
2030 +test_expect_success 'Q: verify third note for first commit' '
2031 + git cat-file blob refs/notes/foobar2:$commit1 >actual && test_cmp expect actual
2032 +'
2033
2034 cat >expect <<EOF
2035 parent `git rev-parse --verify refs/notes/foobar^`
@@ -2037,24 +2038,24 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
2038
2039 notes (:12)
2040 EOF
2040 -test_expect_success \
2041 - 'Q: verify fourth notes commit' \
2042 - 'git cat-file commit refs/notes/foobar | sed 1d >actual &&
2043 - test_cmp expect actual'
2041 +test_expect_success 'Q: verify fourth notes commit' '
2042 + git cat-file commit refs/notes/foobar | sed 1d >actual &&
2043 + test_cmp expect actual
2044 +'
2045
2046 cat >expect.unsorted <<EOF
2047 100644 blob $commit2
2048 EOF
2049 cat expect.unsorted | sort >expect
2049 -test_expect_success \
2050 - 'Q: verify fourth notes tree' \
2051 - 'git cat-file -p refs/notes/foobar^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
2052 - test_cmp expect actual'
2050 +test_expect_success 'Q: verify fourth notes tree' '
2051 + git cat-file -p refs/notes/foobar^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
2052 + test_cmp expect actual
2053 +'
2054
2055 echo "$note2b_data" >expect
2055 -test_expect_success \
2056 - 'Q: verify second note for second commit' \
2057 - 'git cat-file blob refs/notes/foobar:$commit2 >actual && test_cmp expect actual'
2056 +test_expect_success 'Q: verify second note for second commit' '
2057 + git cat-file blob refs/notes/foobar:$commit2 >actual && test_cmp expect actual
2058 +'
2059
2060 cat >input <<EOF
2061 reset refs/heads/Q0
@@ -2070,9 +2071,9 @@ data <<NOTE
2071 some note
2072 NOTE
2073 EOF
2073 -test_expect_success \
2074 - 'Q: deny note on empty branch' \
2075 - 'test_must_fail git fast-import <input'
2074 +test_expect_success 'Q: deny note on empty branch' '
2075 + test_must_fail git fast-import <input
2076 +'
2077 ###
2078 ### series R (feature and option)
2079 ###
@@ -2122,15 +2123,15 @@ hi
2123
2124 EOF
2125
2125 -test_expect_success \
2126 - 'R: export-marks feature results in a marks file being created' \
2127 - 'cat input | git fast-import &&
2128 - grep :1 git.marks'
2126 +test_expect_success 'R: export-marks feature results in a marks file being created' '
2127 + cat input | git fast-import &&
2128 + grep :1 git.marks
2129 +'
2130
2130 -test_expect_success \
2131 - 'R: export-marks options can be overridden by commandline options' \
2132 - 'cat input | git fast-import --export-marks=other.marks &&
2133 - grep :1 other.marks'
2131 +test_expect_success 'R: export-marks options can be overridden by commandline options' '
2132 + cat input | git fast-import --export-marks=other.marks &&
2133 + grep :1 other.marks
2134 +'
2135
2136 test_expect_success 'R: catch typo in marks file name' '
2137 test_must_fail git fast-import --import-marks=nonexistent.marks </dev/null &&
@@ -2239,20 +2240,20 @@ feature import-marks=marks.out
2240 feature export-marks=marks.new
2241 EOF
2242
2242 -test_expect_success \
2243 - 'R: import to output marks works without any content' \
2244 - 'cat input | git fast-import &&
2245 - test_cmp marks.out marks.new'
2243 +test_expect_success 'R: import to output marks works without any content' '
2244 + cat input | git fast-import &&
2245 + test_cmp marks.out marks.new
2246 +'
2247
2248 cat >input <<EOF
2249 feature import-marks=nonexistent.marks
2250 feature export-marks=marks.new
2251 EOF
2252
2252 -test_expect_success \
2253 - 'R: import marks prefers commandline marks file over the stream' \
2254 - 'cat input | git fast-import --import-marks=marks.out &&
2255 - test_cmp marks.out marks.new'
2253 +test_expect_success 'R: import marks prefers commandline marks file over the stream' '
2254 + cat input | git fast-import --import-marks=marks.out &&
2255 + test_cmp marks.out marks.new
2256 +'
2257
2258
2259 cat >input <<EOF
@@ -2261,10 +2262,10 @@ feature export-marks=combined.marks
2262 EOF
2263
2264 test_expect_success 'R: multiple --import-marks= should be honoured' '
2264 - head -n2 marks.out > one.marks &&
2265 - tail -n +3 marks.out > two.marks &&
2266 - git fast-import --import-marks=one.marks --import-marks=two.marks <input &&
2267 - test_cmp marks.out combined.marks
2265 + head -n2 marks.out > one.marks &&
2266 + tail -n +3 marks.out > two.marks &&
2267 + git fast-import --import-marks=one.marks --import-marks=two.marks <input &&
2268 + test_cmp marks.out combined.marks
2269 '
2270
2271 cat >input <<EOF
@@ -2274,10 +2275,10 @@ feature export-marks=relative.out
2275 EOF
2276
2277 test_expect_success 'R: feature relative-marks should be honoured' '
2277 - mkdir -p .git/info/fast-import/ &&
2278 - cp marks.new .git/info/fast-import/relative.in &&
2279 - git fast-import <input &&
2280 - test_cmp marks.new .git/info/fast-import/relative.out
2278 + mkdir -p .git/info/fast-import/ &&
2279 + cp marks.new .git/info/fast-import/relative.in &&
2280 + git fast-import <input &&
2281 + test_cmp marks.new .git/info/fast-import/relative.out
2282 '
2283
2284 cat >input <<EOF
@@ -2288,8 +2289,8 @@ feature export-marks=non-relative.out
2289 EOF
2290
2291 test_expect_success 'R: feature no-relative-marks should be honoured' '
2291 - git fast-import <input &&
2292 - test_cmp marks.new non-relative.out
2292 + git fast-import <input &&
2293 + test_cmp marks.new non-relative.out
2294 '
2295
2296 test_expect_success 'R: feature ls supported' '
@@ -2558,8 +2559,8 @@ hi
2559 EOF
2560
2561 test_expect_success 'R: quiet option results in no stats being output' '
2561 - cat input | git fast-import 2> output &&
2562 - test_cmp empty output
2562 + cat input | git fast-import 2> output &&
2563 + test_cmp empty output
2564 '
2565
2566 test_expect_success 'R: feature done means terminating "done" is mandatory' '
@@ -2609,11 +2610,11 @@ option git non-existing-option
2610 EOF
2611
2612 test_expect_success 'R: die on unknown option' '
2612 - test_must_fail git fast-import <input
2613 + test_must_fail git fast-import <input
2614 '
2615
2616 test_expect_success 'R: unknown commandline options are rejected' '\
2616 - test_must_fail git fast-import --non-existing-option < /dev/null
2617 + test_must_fail git fast-import --non-existing-option < /dev/null
2618 '
2619
2620 test_expect_success 'R: die on invalid option argument' '
@@ -2629,7 +2630,7 @@ option non-existing-vcs non-existing-option
2630 EOF
2631
2632 test_expect_success 'R: ignore non-git options' '
2632 - git fast-import <input
2633 + git fast-import <input
2634 '
2635
2636 ##
@@ -2655,10 +2656,10 @@ INPUT_END
2656 cat expect >>input
2657 echo >>input
2658
2658 -test_expect_success \
2659 - 'R: blob bigger than threshold' \
2660 - 'test_create_repo R &&
2661 - git --git-dir=R/.git fast-import --big-file-threshold=1 <input'
2659 +test_expect_success 'R: blob bigger than threshold' '
2660 + test_create_repo R &&
2661 + git --git-dir=R/.git fast-import --big-file-threshold=1 <input
2662 +'
2663
2664 test_expect_success 'R: verify created pack' '
2665 (
@@ -2667,17 +2668,18 @@ test_expect_success 'R: verify created pack' '
2668 )
2669 '
2670
2670 -test_expect_success \
2671 - 'R: verify written objects' \
2672 - 'git --git-dir=R/.git cat-file blob big-file:big1 >actual &&
2673 - test_cmp_bin expect actual &&
2674 - a=$(git --git-dir=R/.git rev-parse big-file:big1) &&
2675 - b=$(git --git-dir=R/.git rev-parse big-file:big2) &&
2676 - test $a = $b'
2677 -test_expect_success \
2678 - 'R: blob appears only once' \
2679 - 'n=$(grep $a verify | wc -l) &&
2680 - test 1 = $n'
2671 +test_expect_success 'R: verify written objects' '
2672 + git --git-dir=R/.git cat-file blob big-file:big1 >actual &&
2673 + test_cmp_bin expect actual &&
2674 + a=$(git --git-dir=R/.git rev-parse big-file:big1) &&
2675 + b=$(git --git-dir=R/.git rev-parse big-file:big2) &&
2676 + test $a = $b
2677 +'
2678 +
2679 +test_expect_success 'R: blob appears only once' '
2680 + n=$(grep $a verify | wc -l) &&
2681 + test 1 = $n
2682 +'
2683
2684 ###
2685 ### series S
@@ -3088,7 +3090,7 @@ D ""
3090 INPUT_END
3091
3092 test_expect_success 'U: filedelete root succeeds' '
3091 - git fast-import <input
3093 + git fast-import <input
3094 '
3095
3096 cat >expect <<EOF