{"thread":{"id":"40837","subject":"[PATCH 0/7] Modernize t9300-fast-import","startedAt":"2015-11-19T19:09:42Z","lastAt":"2015-11-20T11:22:23Z","messageCount":10,"participants":["Johannes Sixt","Eric Sunshine","Jeff King"],"isPatch":true,"patchVersion":1,"patchTotal":7},"messages":[{"id":"273508","messageId":"cover.1447959452.git.j6t@kdbg.org","threadId":"40837","inReplyTo":null,"subject":"[PATCH 0/7] Modernize t9300-fast-import","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2015-11-19T19:09:42Z","receivedAt":"2015-11-19T19:09:42Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Some time ago, I had to dig into t9300-fast-import and found it quite\nunhelpful that it does not follow our modern best-practices. This series\nbrings it up-to-date. I thought I submit it now while it is quiet in\nthe area.\n\nThe larger patches are best viewed using -w -color-words because the\nregular patch text is ... overwhelming.\n\nImproving shell coding style is outside the scope of this series. I mean\nfixing eyesores such as 'cat >foo <<EOF && cat foo | sort > bar', or minor\nthings such as quoting <<\\EOF when the here-doc does not require\nsubstitutions.\n\nIn case the large patches don't make it to the list, the series is also\navailable from\n\n  https://github.com/j6t/git.git modernize-t9300\n\nJohannes Sixt (7):\n  modernize t9300: single-quote placement and indentation\n  modernize t9300: use test_must_fail\n  modernize t9300: use test_must_be_empty\n  modernize t9300: wrap lines after &&\n  modernize t9300: use test_when_finished for clean-up\n  modernize t9300: mark here-doc words to ignore tab indentation\n  modernize t9300: move test preparations into test_expect_success\n\n t/t9300-fast-import.sh | 3629 ++++++++++++++++++++++++------------------------\n 1 file changed, 1822 insertions(+), 1807 deletions(-)\n\n-- \n2.6.2.337.ga235d84\n"},{"id":"273511","messageId":"281fdb4f4b9f02c9fc1ee6664191ce325045c7bf.1447959452.git.j6t@kdbg.org","threadId":"40837","inReplyTo":"cover.1447959452.git.j6t@kdbg.org","subject":"[PATCH 1/7] modernize t9300: single-quote placement and indentation","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2015-11-19T19:09:43Z","receivedAt":"2015-11-19T19:09:43Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Many test cases do not follow our modern style that places the\nsingle-quotes that surround the shell code snippets before and after\nthe shell code. Make it so.\n\nMany of the lines changed in this way are indented other than by a\nsingle tab. Change them (and some additional lines) to be indented\nwith a tab.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t9300-fast-import.sh | 872 +++++++++++++++++++++++++------------------------\n 1 file changed, 437 insertions(+), 435 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 9984c48..566f7bd 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -100,10 +100,10 @@ An annotated tag that annotates a blob.\n EOF\n \n INPUT_END\n-test_expect_success \\\n-    'A: create pack from stdin' \\\n-    'git fast-import --export-marks=marks.out <input &&\n-\t git whatchanged master'\n+test_expect_success 'A: create pack from stdin' '\n+\tgit fast-import --export-marks=marks.out <input &&\n+\tgit whatchanged master\n+'\n \n test_expect_success 'A: verify pack' '\n \tverify_packs\n@@ -115,35 +115,35 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n initial\n EOF\n-test_expect_success \\\n-\t'A: verify commit' \\\n-\t'git cat-file commit master | sed 1d >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'A: verify commit' '\n+\tgit cat-file commit master | sed 1d >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >expect <<EOF\n 100644 blob file2\n 100644 blob file3\n 100755 blob file4\n EOF\n-test_expect_success \\\n-\t'A: verify tree' \\\n-\t'git cat-file -p master^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'A: verify tree' '\n+\tgit cat-file -p master^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n+\ttest_cmp expect actual\n+'\n \n echo \"$file2_data\" >expect\n-test_expect_success \\\n-\t'A: verify file2' \\\n-\t'git cat-file blob master:file2 >actual && test_cmp expect actual'\n+test_expect_success 'A: verify file2' '\n+\tgit cat-file blob master:file2 >actual && test_cmp expect actual\n+'\n \n echo \"$file3_data\" >expect\n-test_expect_success \\\n-\t'A: verify file3' \\\n-\t'git cat-file blob master:file3 >actual && test_cmp expect actual'\n+test_expect_success 'A: verify file3' '\n+\tgit cat-file blob master:file3 >actual && test_cmp expect actual\n+'\n \n printf \"$file4_data\" >expect\n-test_expect_success \\\n-\t'A: verify file4' \\\n-\t'git cat-file blob master:file4 >actual && test_cmp expect actual'\n+test_expect_success 'A: verify file4' '\n+\tgit cat-file blob master:file4 >actual && test_cmp expect actual\n+'\n \n cat >expect <<EOF\n object $(git rev-parse refs/heads/master)\n@@ -175,17 +175,17 @@ cat >expect <<EOF\n :4 `git rev-parse --verify master:file4`\n :5 `git rev-parse --verify master^0`\n EOF\n-test_expect_success \\\n-\t'A: verify marks output' \\\n-\t'test_cmp expect marks.out'\n+test_expect_success 'A: verify marks output' '\n+\ttest_cmp expect marks.out\n+'\n \n-test_expect_success \\\n-\t'A: verify marks import' \\\n-\t'git fast-import \\\n+test_expect_success 'A: verify marks import' '\n+\tgit fast-import \\\n \t\t--import-marks=marks.out \\\n \t\t--export-marks=marks.new \\\n \t\t</dev/null &&\n-\ttest_cmp expect marks.new'\n+\ttest_cmp expect marks.new\n+'\n \n test_tick\n new_blob=$(echo testing | git hash-object --stdin)\n@@ -229,12 +229,12 @@ tag series-A-blob-3\n Tag new_blob.\n EOF\n \n-test_expect_success \\\n-\t'A: tag blob by sha1' \\\n-\t'git fast-import <input &&\n+test_expect_success 'A: tag blob by sha1' '\n+\tgit fast-import <input &&\n \tgit cat-file tag tags/series-A-blob-2 >actual &&\n \tgit cat-file tag tags/series-A-blob-3 >>actual &&\n-\ttest_cmp expect actual'\n+\ttest_cmp expect actual\n+'\n \n test_tick\n cat >input <<INPUT_END\n@@ -248,10 +248,10 @@ from :5\n M 755 :2 copy-of-file2\n \n INPUT_END\n-test_expect_success \\\n-\t'A: verify marks import does not crash' \\\n-\t'git fast-import --import-marks=marks.out <input &&\n-\t git whatchanged verify--import-marks'\n+test_expect_success 'A: verify marks import does not crash' '\n+\tgit fast-import --import-marks=marks.out <input &&\n+\tgit whatchanged verify--import-marks\n+'\n \n test_expect_success 'A: verify pack' '\n \tverify_packs\n@@ -261,11 +261,11 @@ cat >expect <<EOF\n :000000 100755 0000000000000000000000000000000000000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 A\tcopy-of-file2\n EOF\n git diff-tree -M -r master verify--import-marks >actual\n-test_expect_success \\\n-\t'A: verify diff' \\\n-\t'compare_diff_raw expect actual &&\n-\t test `git rev-parse --verify master:file2` \\\n-\t    = `git rev-parse --verify verify--import-marks:copy-of-file2`'\n+test_expect_success 'A: verify diff' '\n+\tcompare_diff_raw expect actual &&\n+\ttest `git rev-parse --verify master:file2` \\\n+\t    = `git rev-parse --verify verify--import-marks:copy-of-file2`\n+'\n \n test_tick\n mt=$(git hash-object --stdin < /dev/null)\n@@ -322,7 +322,8 @@ test_expect_success 'A: export marks with large values' '\n \tcat input.blob input.commit | git fast-import --export-marks=marks.large &&\n \tgit ls-tree refs/heads/verify--dump-marks >tree.out &&\n \ttest_cmp tree.exp_s tree.out &&\n-\ttest_cmp marks.exp marks.large'\n+\ttest_cmp marks.exp marks.large\n+'\n \n ###\n ### series B\n@@ -342,7 +343,7 @@ M 755 0000000000000000000000000000000000000001 zero1\n \n INPUT_END\n test_expect_success 'B: fail on invalid blob sha1' '\n-    test_must_fail git fast-import <input\n+\ttest_must_fail git fast-import <input\n '\n rm -f .git/objects/pack_* .git/objects/index_*\n \n@@ -356,11 +357,11 @@ COMMIT\n from refs/heads/master\n \n INPUT_END\n-test_expect_success \\\n-    'B: accept branch name \"TEMP_TAG\"' \\\n-    'git fast-import <input &&\n-\t test -f .git/TEMP_TAG &&\n-\t test `git rev-parse master` = `git rev-parse TEMP_TAG^`'\n+test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n+\tgit fast-import <input &&\n+\ttest -f .git/TEMP_TAG &&\n+\ttest `git rev-parse master` = `git rev-parse TEMP_TAG^`\n+'\n rm -f .git/TEMP_TAG\n \n git gc 2>/dev/null >/dev/null\n@@ -482,19 +483,19 @@ M 755 $newf file2/newf\n D file3\n \n INPUT_END\n-test_expect_success \\\n-    'C: incremental import create pack from stdin' \\\n-    'git fast-import <input &&\n-\t git whatchanged branch'\n+test_expect_success 'C: incremental import create pack from stdin' '\n+\tgit fast-import <input &&\n+\tgit whatchanged branch\n+'\n \n test_expect_success 'C: verify pack' '\n \tverify_packs\n '\n \n-test_expect_success \\\n-\t'C: validate reuse existing blob' \\\n-\t'test $newf = `git rev-parse --verify branch:file2/newf` &&\n-\t test $oldf = `git rev-parse --verify branch:file2/oldf`'\n+test_expect_success 'C: validate reuse existing blob' '\n+\ttest $newf = `git rev-parse --verify branch:file2/newf` &&\n+\ttest $oldf = `git rev-parse --verify branch:file2/oldf`\n+'\n \n cat >expect <<EOF\n parent `git rev-parse --verify master^0`\n@@ -503,10 +504,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n second\n EOF\n-test_expect_success \\\n-\t'C: verify commit' \\\n-\t'git cat-file commit branch | sed 1d >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'C: verify commit' '\n+\tgit cat-file commit branch | sed 1d >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >expect <<EOF\n :000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A\tfile2/newf\n@@ -514,9 +515,9 @@ cat >expect <<EOF\n :100644 000000 0d92e9f3374ae2947c23aa477cbc68ce598135f1 0000000000000000000000000000000000000000 D\tfile3\n EOF\n git diff-tree -M -r master branch >actual\n-test_expect_success \\\n-\t'C: validate rename result' \\\n-\t'compare_diff_raw expect actual'\n+test_expect_success 'C: validate rename result' '\n+\tcompare_diff_raw expect actual\n+'\n \n ###\n ### series D\n@@ -542,10 +543,10 @@ $file6_data\n EOF\n \n INPUT_END\n-test_expect_success \\\n-    'D: inline data in commit' \\\n-    'git fast-import <input &&\n-\t git whatchanged branch'\n+test_expect_success 'D: inline data in commit' '\n+\tgit fast-import <input &&\n+\tgit whatchanged branch\n+'\n \n test_expect_success 'D: verify pack' '\n \tverify_packs\n@@ -556,21 +557,21 @@ cat >expect <<EOF\n :000000 100644 0000000000000000000000000000000000000000 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 A\tnewdir/interesting\n EOF\n git diff-tree -M -r branch^ branch >actual\n-test_expect_success \\\n-\t'D: validate new files added' \\\n-\t'compare_diff_raw expect actual'\n+test_expect_success 'D: validate new files added' '\n+\tcompare_diff_raw expect actual\n+'\n \n echo \"$file5_data\" >expect\n-test_expect_success \\\n-\t'D: verify file5' \\\n-\t'git cat-file blob branch:newdir/interesting >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'D: verify file5' '\n+\tgit cat-file blob branch:newdir/interesting >actual &&\n+\ttest_cmp expect actual\n+'\n \n echo \"$file6_data\" >expect\n-test_expect_success \\\n-\t'D: verify file6' \\\n-\t'git cat-file blob branch:newdir/exec.sh >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'D: verify file6' '\n+\tgit cat-file blob branch:newdir/exec.sh >actual &&\n+\ttest_cmp expect actual\n+'\n \n ###\n ### series E\n@@ -588,11 +589,11 @@ from refs/heads/branch^0\n \n INPUT_END\n test_expect_success 'E: rfc2822 date, --date-format=raw' '\n-    test_must_fail git fast-import --date-format=raw <input\n+\ttest_must_fail git fast-import --date-format=raw <input\n+'\n+test_expect_success 'E: rfc2822 date, --date-format=rfc2822' '\n+\tgit fast-import --date-format=rfc2822 <input\n '\n-test_expect_success \\\n-    'E: rfc2822 date, --date-format=rfc2822' \\\n-    'git fast-import --date-format=rfc2822 <input'\n \n test_expect_success 'E: verify pack' '\n \tverify_packs\n@@ -604,10 +605,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1170783302 -0500\n \n RFC 2822 type date\n EOF\n-test_expect_success \\\n-\t'E: verify commit' \\\n-\t'git cat-file commit branch | sed 1,2d >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'E: verify commit' '\n+\tgit cat-file commit branch | sed 1,2d >actual &&\n+\ttest_cmp expect actual\n+'\n \n ###\n ### series F\n@@ -628,13 +629,12 @@ reset refs/heads/other\n from refs/heads/branch\n \n INPUT_END\n-test_expect_success \\\n-    'F: non-fast-forward update skips' \\\n-    'if git fast-import <input\n-\t then\n+test_expect_success 'F: non-fast-forward update skips' '\n+\tif git fast-import <input\n+\tthen\n \t\techo BAD gfi did not fail\n \t\treturn 1\n-\t else\n+\telse\n \t\tif test $old_branch = `git rev-parse --verify branch^0`\n \t\tthen\n \t\t\t: branch unaffected and failure returned\n@@ -643,8 +643,8 @@ test_expect_success \\\n \t\t\techo BAD gfi changed branch $old_branch\n \t\t\treturn 1\n \t\tfi\n-\t fi\n-\t'\n+\tfi\n+'\n \n test_expect_success 'F: verify pack' '\n \tverify_packs\n@@ -658,10 +658,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n losing things already?\n EOF\n-test_expect_success \\\n-\t'F: verify other commit' \\\n-\t'git cat-file commit other >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'F: verify other commit' '\n+\tgit cat-file commit other >actual &&\n+\ttest_cmp expect actual\n+'\n \n ###\n ### series G\n@@ -679,18 +679,18 @@ COMMIT\n from refs/heads/branch~1\n \n INPUT_END\n-test_expect_success \\\n-    'G: non-fast-forward update forced' \\\n-    'git fast-import --force <input'\n+test_expect_success 'G: non-fast-forward update forced' '\n+\tgit fast-import --force <input\n+'\n \n test_expect_success 'G: verify pack' '\n \tverify_packs\n '\n \n-test_expect_success \\\n-\t'G: branch changed, but logged' \\\n-\t'test $old_branch != `git rev-parse --verify branch^0` &&\n-\t test $old_branch = `git rev-parse --verify branch@{1}`'\n+test_expect_success 'G: branch changed, but logged' '\n+\ttest $old_branch != `git rev-parse --verify branch^0` &&\n+\ttest $old_branch = `git rev-parse --verify branch@{1}`\n+'\n \n ###\n ### series H\n@@ -717,10 +717,10 @@ $file5_data\n EOF\n \n INPUT_END\n-test_expect_success \\\n-    'H: deletall, add 1' \\\n-    'git fast-import <input &&\n-\t git whatchanged H'\n+test_expect_success 'H: deletall, add 1' '\n+\tgit fast-import <input &&\n+\tgit whatchanged H\n+'\n \n test_expect_success 'H: verify pack' '\n \tverify_packs\n@@ -734,15 +734,15 @@ cat >expect <<EOF\n :100755 000000 e74b7d465e52746be2b4bae983670711e6e66657 0000000000000000000000000000000000000000 D\tnewdir/exec.sh\n EOF\n git diff-tree -M -r H^ H >actual\n-test_expect_success \\\n-\t'H: validate old files removed, new files added' \\\n-\t'compare_diff_raw expect actual'\n+test_expect_success 'H: validate old files removed, new files added' '\n+\tcompare_diff_raw expect actual\n+'\n \n echo \"$file5_data\" >expect\n-test_expect_success \\\n-\t'H: verify file' \\\n-\t'git cat-file blob H:h/e/l/lo >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'H: verify file' '\n+\tgit cat-file blob H:h/e/l/lo >actual &&\n+\ttest_cmp expect actual\n+'\n \n ###\n ### series I\n@@ -758,17 +758,17 @@ COMMIT\n from refs/heads/branch\n \n INPUT_END\n-test_expect_success \\\n-    'I: export-pack-edges' \\\n-    'git fast-import --export-pack-edges=edges.list <input'\n+test_expect_success 'I: export-pack-edges' '\n+\tgit fast-import --export-pack-edges=edges.list <input\n+'\n \n cat >expect <<EOF\n .git/objects/pack/pack-.pack: `git rev-parse --verify export-boundary`\n EOF\n-test_expect_success \\\n-\t'I: verify edge list' \\\n-\t'sed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'I: verify edge list' '\n+\tsed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&\n+\ttest_cmp expect actual\n+'\n \n ###\n ### series J\n@@ -792,13 +792,13 @@ initialize J\n COMMIT\n \n INPUT_END\n-test_expect_success \\\n-    'J: reset existing branch creates empty commit' \\\n-    'git fast-import <input'\n-test_expect_success \\\n-\t'J: branch has 1 commit, empty tree' \\\n-\t'test 1 = `git rev-list J | wc -l` &&\n-\t test 0 = `git ls-tree J | wc -l`'\n+test_expect_success 'J: reset existing branch creates empty commit' '\n+\tgit fast-import <input\n+'\n+test_expect_success 'J: branch has 1 commit, empty tree' '\n+\ttest 1 = `git rev-list J | wc -l` &&\n+\ttest 0 = `git ls-tree J | wc -l`\n+'\n \n cat >input <<INPUT_END\n reset refs/heads/J2\n@@ -809,9 +809,9 @@ data <<EOF\n Tag branch that was reset.\n EOF\n INPUT_END\n-test_expect_success \\\n-\t'J: tag must fail on empty branch' \\\n-\t'test_must_fail git fast-import <input'\n+test_expect_success 'J: tag must fail on empty branch' '\n+\ttest_must_fail git fast-import <input\n+'\n ###\n ### series K\n ###\n@@ -834,13 +834,13 @@ COMMIT\n from refs/heads/branch^1\n \n INPUT_END\n-test_expect_success \\\n-    'K: reinit branch with from' \\\n-    'git fast-import <input'\n-test_expect_success \\\n-    'K: verify K^1 = branch^1' \\\n-    'test `git rev-parse --verify branch^1` \\\n-\t\t= `git rev-parse --verify K^1`'\n+test_expect_success 'K: reinit branch with from' '\n+\tgit fast-import <input\n+'\n+test_expect_success 'K: verify K^1 = branch^1' '\n+\ttest `git rev-parse --verify branch^1` \\\n+\t\t= `git rev-parse --verify K^1`\n+'\n \n ###\n ### series L\n@@ -886,11 +886,11 @@ cat >expect <<EXPECT_END\n :100644 100644 4268632... 55d3a52... M\tba\n EXPECT_END\n \n-test_expect_success \\\n-    'L: verify internal tree sorting' \\\n-\t'git fast-import <input &&\n-\t git diff-tree --abbrev --raw L^ L >output &&\n-\t test_cmp expect output'\n+test_expect_success 'L: verify internal tree sorting' '\n+\tgit fast-import <input &&\n+\tgit diff-tree --abbrev --raw L^ L >output &&\n+\ttest_cmp expect output\n+'\n \n cat >input <<INPUT_END\n blob\n@@ -923,13 +923,13 @@ g/b/f\n g/b/h\n EOF\n \n-test_expect_success \\\n-    'L: nested tree copy does not corrupt deltas' \\\n-\t'git fast-import <input &&\n+test_expect_success 'L: nested tree copy does not corrupt deltas' '\n+\tgit fast-import <input &&\n \tgit ls-tree L2 g/b/ >tmp &&\n \tcat tmp | cut -f 2 >actual &&\n \ttest_cmp expect actual &&\n-\tgit fsck `git rev-parse L2`'\n+\tgit fsck `git rev-parse L2`\n+'\n \n git update-ref -d refs/heads/L2\n \n@@ -953,11 +953,11 @@ INPUT_END\n cat >expect <<EOF\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\tfile2/newf\tfile2/n.e.w.f\n EOF\n-test_expect_success \\\n-\t'M: rename file in same subdirectory' \\\n-\t'git fast-import <input &&\n-\t git diff-tree -M -r M1^ M1 >actual &&\n-\t compare_diff_raw expect actual'\n+test_expect_success 'M: rename file in same subdirectory' '\n+\tgit fast-import <input &&\n+\tgit diff-tree -M -r M1^ M1 >actual &&\n+\tcompare_diff_raw expect actual\n+'\n \n cat >input <<INPUT_END\n commit refs/heads/M2\n@@ -974,11 +974,11 @@ INPUT_END\n cat >expect <<EOF\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\tfile2/newf\ti/am/new/to/you\n EOF\n-test_expect_success \\\n-\t'M: rename file to new subdirectory' \\\n-\t'git fast-import <input &&\n-\t git diff-tree -M -r M2^ M2 >actual &&\n-\t compare_diff_raw expect actual'\n+test_expect_success 'M: rename file to new subdirectory' '\n+\tgit fast-import <input &&\n+\tgit diff-tree -M -r M2^ M2 >actual &&\n+\tcompare_diff_raw expect actual\n+'\n \n cat >input <<INPUT_END\n commit refs/heads/M3\n@@ -995,11 +995,11 @@ INPUT_END\n cat >expect <<EOF\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\ti/am/new/to/you\tother/sub/am/new/to/you\n EOF\n-test_expect_success \\\n-\t'M: rename subdirectory to new subdirectory' \\\n-\t'git fast-import <input &&\n-\t git diff-tree -M -r M3^ M3 >actual &&\n-\t compare_diff_raw expect actual'\n+test_expect_success 'M: rename subdirectory to new subdirectory' '\n+\tgit fast-import <input &&\n+\tgit diff-tree -M -r M3^ M3 >actual &&\n+\tcompare_diff_raw expect actual\n+'\n \n cat >input <<INPUT_END\n commit refs/heads/M4\n@@ -1020,12 +1020,12 @@ cat >expect <<EOF\n :100755 100755 e74b7d465e52746be2b4bae983670711e6e66657 e74b7d465e52746be2b4bae983670711e6e66657 R100\tnewdir/exec.sh\tsub/newdir/exec.sh\n :100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 R100\tnewdir/interesting\tsub/newdir/interesting\n EOF\n-test_expect_success \\\n-\t'M: rename root to subdirectory' \\\n-\t'git fast-import <input &&\n-\t git diff-tree -M -r M4^ M4 >actual &&\n-\t cat actual &&\n-\t compare_diff_raw expect actual'\n+test_expect_success 'M: rename root to subdirectory' '\n+\tgit fast-import <input &&\n+\tgit diff-tree -M -r M4^ M4 >actual &&\n+\tcat actual &&\n+\tcompare_diff_raw expect actual\n+'\n \n ###\n ### series N\n@@ -1047,11 +1047,11 @@ INPUT_END\n cat >expect <<EOF\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile2/n.e.w.f\n EOF\n-test_expect_success \\\n-\t'N: copy file in same subdirectory' \\\n-\t'git fast-import <input &&\n-\t git diff-tree -C --find-copies-harder -r N1^ N1 >actual &&\n-\t compare_diff_raw expect actual'\n+test_expect_success 'N: copy file in same subdirectory' '\n+\tgit fast-import <input &&\n+\tgit diff-tree -C --find-copies-harder -r N1^ N1 >actual &&\n+\tcompare_diff_raw expect actual\n+'\n \n cat >input <<INPUT_END\n commit refs/heads/N2\n@@ -1081,11 +1081,11 @@ cat >expect <<EOF\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile3/newf\n :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100\tfile2/oldf\tfile3/oldf\n EOF\n-test_expect_success \\\n-\t'N: copy then modify subdirectory' \\\n-\t'git fast-import <input &&\n-\t git diff-tree -C --find-copies-harder -r N2^^ N2 >actual &&\n-\t compare_diff_raw expect actual'\n+test_expect_success 'N: copy then modify subdirectory' '\n+\tgit fast-import <input &&\n+\tgit diff-tree -C --find-copies-harder -r N2^^ N2 >actual &&\n+\tcompare_diff_raw expect actual\n+'\n \n cat >input <<INPUT_END\n commit refs/heads/N3\n@@ -1105,19 +1105,18 @@ D file2/file5\n \n INPUT_END\n \n-test_expect_success \\\n-\t'N: copy dirty subdirectory' \\\n-\t'git fast-import <input &&\n-\t test `git rev-parse N2^{tree}` = `git rev-parse N3^{tree}`'\n+test_expect_success 'N: copy dirty subdirectory' '\n+\tgit fast-import <input &&\n+\ttest `git rev-parse N2^{tree}` = `git rev-parse N3^{tree}`\n+'\n \n-test_expect_success \\\n-\t'N: copy directory by id' \\\n-\t'cat >expect <<-\\EOF &&\n+test_expect_success 'N: copy directory by id' '\n+\tcat >expect <<-\\EOF &&\n \t:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile3/newf\n \t:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100\tfile2/oldf\tfile3/oldf\n \tEOF\n-\t subdir=$(git rev-parse refs/heads/branch^0:file2) &&\n-\t cat >input <<-INPUT_END &&\n+\tsubdir=$(git rev-parse refs/heads/branch^0:file2) &&\n+\tcat >input <<-INPUT_END &&\n \tcommit refs/heads/N4\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1127,9 +1126,10 @@ test_expect_success \\\n \tfrom refs/heads/branch^0\n \tM 040000 $subdir file3\n \tINPUT_END\n-\t git fast-import <input &&\n-\t git diff-tree -C --find-copies-harder -r N4^ N4 >actual &&\n-\t compare_diff_raw expect actual'\n+\tgit fast-import <input &&\n+\tgit diff-tree -C --find-copies-harder -r N4^ N4 >actual &&\n+\tcompare_diff_raw expect actual\n+'\n \n test_expect_success PIPE 'N: read and copy directory' '\n \tcat >expect <<-\\EOF &&\n@@ -1202,14 +1202,13 @@ test_expect_success PIPE 'N: empty directory reads as missing' '\n \ttest_cmp expect actual\n '\n \n-test_expect_success \\\n-\t'N: copy root directory by tree hash' \\\n-\t'cat >expect <<-\\EOF &&\n+test_expect_success 'N: copy root directory by tree hash' '\n+\tcat >expect <<-\\EOF &&\n \t:100755 000000 f1fb5da718392694d0076d677d6d0e364c79b0bc 0000000000000000000000000000000000000000 D\tfile3/newf\n \t:100644 000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 0000000000000000000000000000000000000000 D\tfile3/oldf\n \tEOF\n-\t root=$(git rev-parse refs/heads/branch^0^{tree}) &&\n-\t cat >input <<-INPUT_END &&\n+\troot=$(git rev-parse refs/heads/branch^0^{tree}) &&\n+\tcat >input <<-INPUT_END &&\n \tcommit refs/heads/N6\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1219,20 +1218,20 @@ test_expect_success \\\n \tfrom refs/heads/branch^0\n \tM 040000 $root \"\"\n \tINPUT_END\n-\t git fast-import <input &&\n-\t git diff-tree -C --find-copies-harder -r N4 N6 >actual &&\n-\t compare_diff_raw expect actual'\n+\tgit fast-import <input &&\n+\tgit diff-tree -C --find-copies-harder -r N4 N6 >actual &&\n+\tcompare_diff_raw expect actual\n+'\n \n-test_expect_success \\\n-\t'N: copy root by path' \\\n-\t'cat >expect <<-\\EOF &&\n+test_expect_success 'N: copy root by path' '\n+\tcat >expect <<-\\EOF &&\n \t:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\toldroot/file2/newf\n \t:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100\tfile2/oldf\toldroot/file2/oldf\n \t:100755 100755 85df50785d62d3b05ab03d9cbf7e4a0b49449730 85df50785d62d3b05ab03d9cbf7e4a0b49449730 C100\tfile4\toldroot/file4\n \t:100755 100755 e74b7d465e52746be2b4bae983670711e6e66657 e74b7d465e52746be2b4bae983670711e6e66657 C100\tnewdir/exec.sh\toldroot/newdir/exec.sh\n \t:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100\tnewdir/interesting\toldroot/newdir/interesting\n \tEOF\n-\t cat >input <<-INPUT_END &&\n+\tcat >input <<-INPUT_END &&\n \tcommit refs/heads/N-copy-root-path\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1242,21 +1241,21 @@ test_expect_success \\\n \tfrom refs/heads/branch^0\n \tC \"\" oldroot\n \tINPUT_END\n-\t git fast-import <input &&\n-\t git diff-tree -C --find-copies-harder -r branch N-copy-root-path >actual &&\n-\t compare_diff_raw expect actual'\n+\tgit fast-import <input &&\n+\tgit diff-tree -C --find-copies-harder -r branch N-copy-root-path >actual &&\n+\tcompare_diff_raw expect actual\n+'\n \n-test_expect_success \\\n-\t'N: delete directory by copying' \\\n-\t'cat >expect <<-\\EOF &&\n+test_expect_success 'N: delete directory by copying' '\n+\tcat >expect <<-\\EOF &&\n \tOBJID\n \t:100644 000000 OBJID OBJID D\tfoo/bar/qux\n \tOBJID\n \t:000000 100644 OBJID OBJID A\tfoo/bar/baz\n \t:000000 100644 OBJID OBJID A\tfoo/bar/qux\n \tEOF\n-\t empty_tree=$(git mktree </dev/null) &&\n-\t cat >input <<-INPUT_END &&\n+\tempty_tree=$(git mktree </dev/null) &&\n+\tcat >input <<-INPUT_END &&\n \tcommit refs/heads/N-delete\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1282,21 +1281,21 @@ test_expect_success \\\n \n \tM 040000 $empty_tree foo/bar/qux\n \tINPUT_END\n-\t git fast-import <input &&\n-\t git rev-list N-delete |\n+\tgit fast-import <input &&\n+\tgit rev-list N-delete |\n \t\tgit diff-tree -r --stdin --root --always |\n \t\tsed -e \"s/$_x40/OBJID/g\" >actual &&\n-\t test_cmp expect actual'\n+\ttest_cmp expect actual\n+'\n \n-test_expect_success \\\n-\t'N: modify copied tree' \\\n-\t'cat >expect <<-\\EOF &&\n+test_expect_success 'N: modify copied tree' '\n+\tcat >expect <<-\\EOF &&\n \t:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100\tnewdir/interesting\tfile3/file5\n \t:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile3/newf\n \t:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100\tfile2/oldf\tfile3/oldf\n \tEOF\n-\t subdir=$(git rev-parse refs/heads/branch^0:file2) &&\n-\t cat >input <<-INPUT_END &&\n+\tsubdir=$(git rev-parse refs/heads/branch^0:file2) &&\n+\tcat >input <<-INPUT_END &&\n \tcommit refs/heads/N5\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1317,14 +1316,14 @@ test_expect_success \\\n \t$file5_data\n \tEOF\n \tINPUT_END\n-\t git fast-import <input &&\n-\t git diff-tree -C --find-copies-harder -r N5^^ N5 >actual &&\n-\t compare_diff_raw expect actual'\n-\n-test_expect_success \\\n-\t'N: reject foo/ syntax' \\\n-\t'subdir=$(git rev-parse refs/heads/branch^0:file2) &&\n-\t test_must_fail git fast-import <<-INPUT_END\n+\tgit fast-import <input &&\n+\tgit diff-tree -C --find-copies-harder -r N5^^ N5 >actual &&\n+\tcompare_diff_raw expect actual\n+'\n+\n+test_expect_success 'N: reject foo/ syntax' '\n+\tsubdir=$(git rev-parse refs/heads/branch^0:file2) &&\n+\ttest_must_fail git fast-import <<-INPUT_END\n \tcommit refs/heads/N5B\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1333,11 +1332,11 @@ test_expect_success \\\n \n \tfrom refs/heads/branch^0\n \tM 040000 $subdir file3/\n-\tINPUT_END'\n+\tINPUT_END\n+'\n \n-test_expect_success \\\n-\t'N: reject foo/ syntax in copy source' \\\n-\t'test_must_fail git fast-import <<-INPUT_END\n+test_expect_success 'N: reject foo/ syntax in copy source' '\n+\ttest_must_fail git fast-import <<-INPUT_END\n \tcommit refs/heads/N5C\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1346,11 +1345,11 @@ test_expect_success \\\n \n \tfrom refs/heads/branch^0\n \tC file2/ file3\n-\tINPUT_END'\n+\tINPUT_END\n+'\n \n-test_expect_success \\\n-\t'N: reject foo/ syntax in rename source' \\\n-\t'test_must_fail git fast-import <<-INPUT_END\n+test_expect_success 'N: reject foo/ syntax in rename source' '\n+\ttest_must_fail git fast-import <<-INPUT_END\n \tcommit refs/heads/N5D\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1359,11 +1358,11 @@ test_expect_success \\\n \n \tfrom refs/heads/branch^0\n \tR file2/ file3\n-\tINPUT_END'\n+\tINPUT_END\n+'\n \n-test_expect_success \\\n-\t'N: reject foo/ syntax in ls argument' \\\n-\t'test_must_fail git fast-import <<-INPUT_END\n+test_expect_success 'N: reject foo/ syntax in ls argument' '\n+\ttest_must_fail git fast-import <<-INPUT_END\n \tcommit refs/heads/N5E\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1372,13 +1371,13 @@ test_expect_success \\\n \n \tfrom refs/heads/branch^0\n \tls \"file2/\"\n-\tINPUT_END'\n+\tINPUT_END\n+'\n \n-test_expect_success \\\n-\t'N: copy to root by id and modify' \\\n-\t'echo \"hello, world\" >expect.foo &&\n-\t echo hello >expect.bar &&\n-\t git fast-import <<-SETUP_END &&\n+test_expect_success 'N: copy to root by id and modify' '\n+\techo \"hello, world\" >expect.foo &&\n+\techo hello >expect.bar &&\n+\tgit fast-import <<-SETUP_END &&\n \tcommit refs/heads/N7\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1392,8 +1391,8 @@ test_expect_success \\\n \tEOF\n \tSETUP_END\n \n-\t tree=$(git rev-parse --verify N7:) &&\n-\t git fast-import <<-INPUT_END &&\n+\ttree=$(git rev-parse --verify N7:) &&\n+\tgit fast-import <<-INPUT_END &&\n \tcommit refs/heads/N8\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1406,15 +1405,15 @@ test_expect_success \\\n \thello, world\n \tEOF\n \tINPUT_END\n-\t git show N8:foo/foo >actual.foo &&\n-\t git show N8:foo/bar >actual.bar &&\n-\t test_cmp expect.foo actual.foo &&\n-\t test_cmp expect.bar actual.bar'\n-\n-test_expect_success \\\n-\t'N: extract subtree' \\\n-\t'branch=$(git rev-parse --verify refs/heads/branch^{tree}) &&\n-\t cat >input <<-INPUT_END &&\n+\tgit show N8:foo/foo >actual.foo &&\n+\tgit show N8:foo/bar >actual.bar &&\n+\ttest_cmp expect.foo actual.foo &&\n+\ttest_cmp expect.bar actual.bar\n+'\n+\n+test_expect_success 'N: extract subtree' '\n+\tbranch=$(git rev-parse --verify refs/heads/branch^{tree}) &&\n+\tcat >input <<-INPUT_END &&\n \tcommit refs/heads/N9\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1424,14 +1423,14 @@ test_expect_success \\\n \tM 040000 $branch \"\"\n \tC \"newdir\" \"\"\n \tINPUT_END\n-\t git fast-import <input &&\n-\t git diff --exit-code branch:newdir N9'\n-\n-test_expect_success \\\n-\t'N: modify subtree, extract it, and modify again' \\\n-\t'echo hello >expect.baz &&\n-\t echo hello, world >expect.qux &&\n-\t git fast-import <<-SETUP_END &&\n+\tgit fast-import <input &&\n+\tgit diff --exit-code branch:newdir N9\n+'\n+\n+test_expect_success 'N: modify subtree, extract it, and modify again' '\n+\techo hello >expect.baz &&\n+\techo hello, world >expect.qux &&\n+\tgit fast-import <<-SETUP_END &&\n \tcommit refs/heads/N10\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1445,8 +1444,8 @@ test_expect_success \\\n \tEOF\n \tSETUP_END\n \n-\t tree=$(git rev-parse --verify N10:) &&\n-\t git fast-import <<-INPUT_END &&\n+\ttree=$(git rev-parse --verify N10:) &&\n+\tgit fast-import <<-INPUT_END &&\n \tcommit refs/heads/N11\n \tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \tdata <<COMMIT\n@@ -1461,12 +1460,12 @@ test_expect_success \\\n \tR \"foo\" \"\"\n \tC \"bar/qux\" \"bar/quux\"\n \tINPUT_END\n-\t git show N11:bar/baz >actual.baz &&\n-\t git show N11:bar/qux >actual.qux &&\n-\t git show N11:bar/quux >actual.quux &&\n-\t test_cmp expect.baz actual.baz &&\n-\t test_cmp expect.qux actual.qux &&\n-\t test_cmp expect.qux actual.quux'\n+\tgit show N11:bar/baz >actual.baz &&\n+\tgit show N11:bar/qux >actual.qux &&\n+\tgit show N11:bar/quux >actual.quux &&\n+\ttest_cmp expect.baz actual.baz &&\n+\ttest_cmp expect.qux actual.qux &&\n+\ttest_cmp expect.qux actual.quux'\n \n ###\n ### series O\n@@ -1503,10 +1502,10 @@ D file2/file5\n \n INPUT_END\n \n-test_expect_success \\\n-\t'O: comments are all skipped' \\\n-\t'git fast-import <input &&\n-\t test `git rev-parse N3` = `git rev-parse O1`'\n+test_expect_success 'O: comments are all skipped' '\n+\tgit fast-import <input &&\n+\ttest `git rev-parse N3` = `git rev-parse O1`\n+'\n \n cat >input <<INPUT_END\n commit refs/heads/O2\n@@ -1524,14 +1523,14 @@ D file2/file5\n \n INPUT_END\n \n-test_expect_success \\\n-\t'O: blank lines not necessary after data commands' \\\n-\t'git fast-import <input &&\n-\t test `git rev-parse N3` = `git rev-parse O2`'\n+test_expect_success 'O: blank lines not necessary after data commands' '\n+\tgit fast-import <input &&\n+\ttest `git rev-parse N3` = `git rev-parse O2`\n+'\n \n-test_expect_success \\\n-\t'O: repack before next test' \\\n-\t'git repack -a -d'\n+test_expect_success 'O: repack before next test' '\n+\tgit repack -a -d\n+'\n \n cat >input <<INPUT_END\n commit refs/heads/O3\n@@ -1569,13 +1568,13 @@ of\n empty\n commits\n INPUT_END\n-test_expect_success \\\n-\t'O: blank lines not necessary after other commands' \\\n-\t'git fast-import <input &&\n-\t test 8 = `find .git/objects/pack -type f | wc -l` &&\n-\t test `git rev-parse refs/tags/O3-2nd` = `git rev-parse O3^` &&\n-\t git log --reverse --pretty=oneline O3 | sed s/^.*z// >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'O: blank lines not necessary after other commands' '\n+\tgit fast-import <input &&\n+\ttest 8 = `find .git/objects/pack -type f | wc -l` &&\n+\ttest `git rev-parse refs/tags/O3-2nd` = `git rev-parse O3^` &&\n+\tgit log --reverse --pretty=oneline O3 | sed s/^.*z// >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >input <<INPUT_END\n commit refs/heads/O4\n@@ -1602,11 +1601,11 @@ zcommits\n COMMIT\n progress I'm done!\n INPUT_END\n-test_expect_success \\\n-\t'O: progress outputs as requested by input' \\\n-\t'git fast-import <input >actual &&\n-\t grep \"progress \" <input >expect &&\n-\t test_cmp expect actual'\n+test_expect_success 'O: progress outputs as requested by input' '\n+\tgit fast-import <input >actual &&\n+\tgrep \"progress \" <input >expect &&\n+\ttest_cmp expect actual\n+'\n \n ###\n ### series P (gitlinks)\n@@ -1667,16 +1666,16 @@ M 160000 :6 sub\n \n INPUT_END\n \n-test_expect_success \\\n-\t'P: superproject & submodule mix' \\\n-\t'git fast-import <input &&\n-\t git checkout subuse1 &&\n-\t rm -rf sub && mkdir sub && (cd sub &&\n-\t git init &&\n-\t git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&\n-\t git checkout master) &&\n-\t git submodule init &&\n-\t git submodule update'\n+test_expect_success 'P: superproject & submodule mix' '\n+\tgit fast-import <input &&\n+\tgit checkout subuse1 &&\n+\trm -rf sub && mkdir sub && (cd sub &&\n+\tgit init &&\n+\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&\n+\tgit checkout master) &&\n+\tgit submodule init &&\n+\tgit submodule update\n+'\n \n SUBLAST=$(git rev-parse --verify sub)\n SUBPREV=$(git rev-parse --verify sub^)\n@@ -1709,12 +1708,12 @@ M 160000 $SUBLAST sub\n \n INPUT_END\n \n-test_expect_success \\\n-\t'P: verbatim SHA gitlinks' \\\n-\t'git branch -D sub &&\n-\t git gc && git prune &&\n-\t git fast-import <input &&\n-\t test $(git rev-parse --verify subuse2) = $(git rev-parse --verify subuse1)'\n+test_expect_success 'P: verbatim SHA gitlinks' '\n+\tgit branch -D sub &&\n+\tgit gc && git prune &&\n+\tgit fast-import <input &&\n+\ttest $(git rev-parse --verify subuse2) = $(git rev-parse --verify subuse1)\n+'\n \n test_tick\n cat >input <<INPUT_END\n@@ -1734,7 +1733,8 @@ DATA\n INPUT_END\n \n test_expect_success 'P: fail on inline gitlink' '\n-    test_must_fail git fast-import <input'\n+\ttest_must_fail git fast-import <input\n+'\n \n test_tick\n cat >input <<INPUT_END\n@@ -1757,7 +1757,8 @@ M 160000 :1 sub\n INPUT_END\n \n test_expect_success 'P: fail on blob mark in gitlink' '\n-    test_must_fail git fast-import <input'\n+\ttest_must_fail git fast-import <input\n+'\n \n ###\n ### series Q (notes)\n@@ -1882,10 +1883,10 @@ EOF\n \n INPUT_END\n \n-test_expect_success \\\n-\t'Q: commit notes' \\\n-\t'git fast-import <input &&\n-\t git whatchanged notes-test'\n+test_expect_success 'Q: commit notes' '\n+\tgit fast-import <input &&\n+\tgit whatchanged notes-test\n+'\n \n test_expect_success 'Q: verify pack' '\n \tverify_packs\n@@ -1901,10 +1902,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n first (:3)\n EOF\n-test_expect_success \\\n-\t'Q: verify first commit' \\\n-\t'git cat-file commit notes-test~2 | sed 1d >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'Q: verify first commit' '\n+\tgit cat-file commit notes-test~2 | sed 1d >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >expect <<EOF\n parent $commit1\n@@ -1913,10 +1914,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n second (:5)\n EOF\n-test_expect_success \\\n-\t'Q: verify second commit' \\\n-\t'git cat-file commit notes-test^ | sed 1d >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'Q: verify second commit' '\n+\tgit cat-file commit notes-test^ | sed 1d >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >expect <<EOF\n parent $commit2\n@@ -1925,10 +1926,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n third (:6)\n EOF\n-test_expect_success \\\n-\t'Q: verify third commit' \\\n-\t'git cat-file commit notes-test | sed 1d >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'Q: verify third commit' '\n+\tgit cat-file commit notes-test | sed 1d >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >expect <<EOF\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -1936,10 +1937,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n notes (:9)\n EOF\n-test_expect_success \\\n-\t'Q: verify first notes commit' \\\n-\t'git cat-file commit refs/notes/foobar~2 | sed 1d >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'Q: verify first notes commit' '\n+\tgit cat-file commit refs/notes/foobar~2 | sed 1d >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >expect.unsorted <<EOF\n 100644 blob $commit1\n@@ -1947,25 +1948,25 @@ cat >expect.unsorted <<EOF\n 100644 blob $commit3\n EOF\n cat expect.unsorted | sort >expect\n-test_expect_success \\\n-\t'Q: verify first notes tree' \\\n-\t'git cat-file -p refs/notes/foobar~2^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'Q: verify first notes tree' '\n+\tgit cat-file -p refs/notes/foobar~2^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n+\ttest_cmp expect actual\n+'\n \n echo \"$note1_data\" >expect\n-test_expect_success \\\n-\t'Q: verify first note for first commit' \\\n-\t'git cat-file blob refs/notes/foobar~2:$commit1 >actual && test_cmp expect actual'\n+test_expect_success 'Q: verify first note for first commit' '\n+\tgit cat-file blob refs/notes/foobar~2:$commit1 >actual && test_cmp expect actual\n+'\n \n echo \"$note2_data\" >expect\n-test_expect_success \\\n-\t'Q: verify first note for second commit' \\\n-\t'git cat-file blob refs/notes/foobar~2:$commit2 >actual && test_cmp expect actual'\n+test_expect_success 'Q: verify first note for second commit' '\n+\tgit cat-file blob refs/notes/foobar~2:$commit2 >actual && test_cmp expect actual\n+'\n \n echo \"$note3_data\" >expect\n-test_expect_success \\\n-\t'Q: verify first note for third commit' \\\n-\t'git cat-file blob refs/notes/foobar~2:$commit3 >actual && test_cmp expect actual'\n+test_expect_success 'Q: verify first note for third commit' '\n+\tgit cat-file blob refs/notes/foobar~2:$commit3 >actual && test_cmp expect actual\n+'\n \n cat >expect <<EOF\n parent `git rev-parse --verify refs/notes/foobar~2`\n@@ -1974,10 +1975,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n notes (:10)\n EOF\n-test_expect_success \\\n-\t'Q: verify second notes commit' \\\n-\t'git cat-file commit refs/notes/foobar^ | sed 1d >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'Q: verify second notes commit' '\n+\tgit cat-file commit refs/notes/foobar^ | sed 1d >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >expect.unsorted <<EOF\n 100644 blob $commit1\n@@ -1985,25 +1986,25 @@ cat >expect.unsorted <<EOF\n 100644 blob $commit3\n EOF\n cat expect.unsorted | sort >expect\n-test_expect_success \\\n-\t'Q: verify second notes tree' \\\n-\t'git cat-file -p refs/notes/foobar^^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'Q: verify second notes tree' '\n+\tgit cat-file -p refs/notes/foobar^^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n+\ttest_cmp expect actual\n+'\n \n echo \"$note1b_data\" >expect\n-test_expect_success \\\n-\t'Q: verify second note for first commit' \\\n-\t'git cat-file blob refs/notes/foobar^:$commit1 >actual && test_cmp expect actual'\n+test_expect_success 'Q: verify second note for first commit' '\n+\tgit cat-file blob refs/notes/foobar^:$commit1 >actual && test_cmp expect actual\n+'\n \n echo \"$note2_data\" >expect\n-test_expect_success \\\n-\t'Q: verify first note for second commit' \\\n-\t'git cat-file blob refs/notes/foobar^:$commit2 >actual && test_cmp expect actual'\n+test_expect_success 'Q: verify first note for second commit' '\n+\tgit cat-file blob refs/notes/foobar^:$commit2 >actual && test_cmp expect actual\n+'\n \n echo \"$note3_data\" >expect\n-test_expect_success \\\n-\t'Q: verify first note for third commit' \\\n-\t'git cat-file blob refs/notes/foobar^:$commit3 >actual && test_cmp expect actual'\n+test_expect_success 'Q: verify first note for third commit' '\n+\tgit cat-file blob refs/notes/foobar^:$commit3 >actual && test_cmp expect actual\n+'\n \n cat >expect <<EOF\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -2011,24 +2012,24 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n notes (:11)\n EOF\n-test_expect_success \\\n-\t'Q: verify third notes commit' \\\n-\t'git cat-file commit refs/notes/foobar2 | sed 1d >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'Q: verify third notes commit' '\n+\tgit cat-file commit refs/notes/foobar2 | sed 1d >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >expect.unsorted <<EOF\n 100644 blob $commit1\n EOF\n cat expect.unsorted | sort >expect\n-test_expect_success \\\n-\t'Q: verify third notes tree' \\\n-\t'git cat-file -p refs/notes/foobar2^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'Q: verify third notes tree' '\n+\tgit cat-file -p refs/notes/foobar2^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n+\ttest_cmp expect actual\n+'\n \n echo \"$note1c_data\" >expect\n-test_expect_success \\\n-\t'Q: verify third note for first commit' \\\n-\t'git cat-file blob refs/notes/foobar2:$commit1 >actual && test_cmp expect actual'\n+test_expect_success 'Q: verify third note for first commit' '\n+\tgit cat-file blob refs/notes/foobar2:$commit1 >actual && test_cmp expect actual\n+'\n \n cat >expect <<EOF\n parent `git rev-parse --verify refs/notes/foobar^`\n@@ -2037,24 +2038,24 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n notes (:12)\n EOF\n-test_expect_success \\\n-\t'Q: verify fourth notes commit' \\\n-\t'git cat-file commit refs/notes/foobar | sed 1d >actual &&\n-\ttest_cmp expect actual'\n+test_expect_success 'Q: verify fourth notes commit' '\n+\tgit cat-file commit refs/notes/foobar | sed 1d >actual &&\n+\ttest_cmp expect actual\n+'\n \n cat >expect.unsorted <<EOF\n 100644 blob $commit2\n EOF\n cat expect.unsorted | sort >expect\n-test_expect_success \\\n-\t'Q: verify fourth notes tree' \\\n-\t'git cat-file -p refs/notes/foobar^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n-\t test_cmp expect actual'\n+test_expect_success 'Q: verify fourth notes tree' '\n+\tgit cat-file -p refs/notes/foobar^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n+\ttest_cmp expect actual\n+'\n \n echo \"$note2b_data\" >expect\n-test_expect_success \\\n-\t'Q: verify second note for second commit' \\\n-\t'git cat-file blob refs/notes/foobar:$commit2 >actual && test_cmp expect actual'\n+test_expect_success 'Q: verify second note for second commit' '\n+\tgit cat-file blob refs/notes/foobar:$commit2 >actual && test_cmp expect actual\n+'\n \n cat >input <<EOF\n reset refs/heads/Q0\n@@ -2070,9 +2071,9 @@ data <<NOTE\n some note\n NOTE\n EOF\n-test_expect_success \\\n-\t'Q: deny note on empty branch' \\\n-\t'test_must_fail git fast-import <input'\n+test_expect_success 'Q: deny note on empty branch' '\n+\ttest_must_fail git fast-import <input\n+'\n ###\n ### series R (feature and option)\n ###\n@@ -2122,15 +2123,15 @@ hi\n \n EOF\n \n-test_expect_success \\\n-    'R: export-marks feature results in a marks file being created' \\\n-    'cat input | git fast-import &&\n-    grep :1 git.marks'\n+test_expect_success 'R: export-marks feature results in a marks file being created' '\n+\tcat input | git fast-import &&\n+\tgrep :1 git.marks\n+'\n \n-test_expect_success \\\n-    'R: export-marks options can be overridden by commandline options' \\\n-    'cat input | git fast-import --export-marks=other.marks &&\n-    grep :1 other.marks'\n+test_expect_success 'R: export-marks options can be overridden by commandline options' '\n+\tcat input | git fast-import --export-marks=other.marks &&\n+\tgrep :1 other.marks\n+'\n \n test_expect_success 'R: catch typo in marks file name' '\n \ttest_must_fail git fast-import --import-marks=nonexistent.marks </dev/null &&\n@@ -2239,20 +2240,20 @@ feature import-marks=marks.out\n feature export-marks=marks.new\n EOF\n \n-test_expect_success \\\n-    'R: import to output marks works without any content' \\\n-    'cat input | git fast-import &&\n-    test_cmp marks.out marks.new'\n+test_expect_success 'R: import to output marks works without any content' '\n+\tcat input | git fast-import &&\n+\ttest_cmp marks.out marks.new\n+'\n \n cat >input <<EOF\n feature import-marks=nonexistent.marks\n feature export-marks=marks.new\n EOF\n \n-test_expect_success \\\n-    'R: import marks prefers commandline marks file over the stream' \\\n-    'cat input | git fast-import --import-marks=marks.out &&\n-    test_cmp marks.out marks.new'\n+test_expect_success 'R: import marks prefers commandline marks file over the stream' '\n+\tcat input | git fast-import --import-marks=marks.out &&\n+\ttest_cmp marks.out marks.new\n+'\n \n \n cat >input <<EOF\n@@ -2261,10 +2262,10 @@ feature export-marks=combined.marks\n EOF\n \n test_expect_success 'R: multiple --import-marks= should be honoured' '\n-    head -n2 marks.out > one.marks &&\n-    tail -n +3 marks.out > two.marks &&\n-    git fast-import --import-marks=one.marks --import-marks=two.marks <input &&\n-    test_cmp marks.out combined.marks\n+\thead -n2 marks.out > one.marks &&\n+\ttail -n +3 marks.out > two.marks &&\n+\tgit fast-import --import-marks=one.marks --import-marks=two.marks <input &&\n+\ttest_cmp marks.out combined.marks\n '\n \n cat >input <<EOF\n@@ -2274,10 +2275,10 @@ feature export-marks=relative.out\n EOF\n \n test_expect_success 'R: feature relative-marks should be honoured' '\n-    mkdir -p .git/info/fast-import/ &&\n-    cp marks.new .git/info/fast-import/relative.in &&\n-    git fast-import <input &&\n-    test_cmp marks.new .git/info/fast-import/relative.out\n+\tmkdir -p .git/info/fast-import/ &&\n+\tcp marks.new .git/info/fast-import/relative.in &&\n+\tgit fast-import <input &&\n+\ttest_cmp marks.new .git/info/fast-import/relative.out\n '\n \n cat >input <<EOF\n@@ -2288,8 +2289,8 @@ feature export-marks=non-relative.out\n EOF\n \n test_expect_success 'R: feature no-relative-marks should be honoured' '\n-    git fast-import <input &&\n-    test_cmp marks.new non-relative.out\n+\tgit fast-import <input &&\n+\ttest_cmp marks.new non-relative.out\n '\n \n test_expect_success 'R: feature ls supported' '\n@@ -2558,8 +2559,8 @@ hi\n EOF\n \n test_expect_success 'R: quiet option results in no stats being output' '\n-    cat input | git fast-import 2> output &&\n-    test_cmp empty output\n+\tcat input | git fast-import 2> output &&\n+\ttest_cmp empty output\n '\n \n test_expect_success 'R: feature done means terminating \"done\" is mandatory' '\n@@ -2609,11 +2610,11 @@ option git non-existing-option\n EOF\n \n test_expect_success 'R: die on unknown option' '\n-    test_must_fail git fast-import <input\n+\ttest_must_fail git fast-import <input\n '\n \n test_expect_success 'R: unknown commandline options are rejected' '\\\n-    test_must_fail git fast-import --non-existing-option < /dev/null\n+\ttest_must_fail git fast-import --non-existing-option < /dev/null\n '\n \n test_expect_success 'R: die on invalid option argument' '\n@@ -2629,7 +2630,7 @@ option non-existing-vcs non-existing-option\n EOF\n \n test_expect_success 'R: ignore non-git options' '\n-    git fast-import <input\n+\tgit fast-import <input\n '\n \n ##\n@@ -2655,10 +2656,10 @@ INPUT_END\n cat expect >>input\n echo >>input\n \n-test_expect_success \\\n-\t'R: blob bigger than threshold' \\\n-\t'test_create_repo R &&\n-\t git --git-dir=R/.git fast-import --big-file-threshold=1 <input'\n+test_expect_success 'R: blob bigger than threshold' '\n+\ttest_create_repo R &&\n+\tgit --git-dir=R/.git fast-import --big-file-threshold=1 <input\n+'\n \n test_expect_success 'R: verify created pack' '\n \t(\n@@ -2667,17 +2668,18 @@ test_expect_success 'R: verify created pack' '\n \t)\n '\n \n-test_expect_success \\\n-\t'R: verify written objects' \\\n-\t'git --git-dir=R/.git cat-file blob big-file:big1 >actual &&\n-\t test_cmp_bin expect actual &&\n-\t a=$(git --git-dir=R/.git rev-parse big-file:big1) &&\n-\t b=$(git --git-dir=R/.git rev-parse big-file:big2) &&\n-\t test $a = $b'\n-test_expect_success \\\n-\t'R: blob appears only once' \\\n-\t'n=$(grep $a verify | wc -l) &&\n-\t test 1 = $n'\n+test_expect_success 'R: verify written objects' '\n+\tgit --git-dir=R/.git cat-file blob big-file:big1 >actual &&\n+\ttest_cmp_bin expect actual &&\n+\ta=$(git --git-dir=R/.git rev-parse big-file:big1) &&\n+\tb=$(git --git-dir=R/.git rev-parse big-file:big2) &&\n+\ttest $a = $b\n+'\n+\n+test_expect_success 'R: blob appears only once' '\n+\tn=$(grep $a verify | wc -l) &&\n+\ttest 1 = $n\n+'\n \n ###\n ### series S\n@@ -3088,7 +3090,7 @@ D \"\"\n INPUT_END\n \n test_expect_success 'U: filedelete root succeeds' '\n-    git fast-import <input\n+\tgit fast-import <input\n '\n \n cat >expect <<EOF\n-- \n2.6.2.337.ga235d84\n"},{"id":"273509","messageId":"46b654a91df9ae0c85e406e6a17ca918b63351ee.1447959452.git.j6t@kdbg.org","threadId":"40837","inReplyTo":"cover.1447959452.git.j6t@kdbg.org","subject":"[PATCH 2/7] modernize t9300: use test_must_fail","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2015-11-19T19:09:44Z","receivedAt":"2015-11-19T19:09:44Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"One test case open-codes a test for an expected failure. Replace it by\ntest_must_fail.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t9300-fast-import.sh | 17 +++--------------\n 1 file changed, 3 insertions(+), 14 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 566f7bd..e9c7602 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -630,20 +630,9 @@ from refs/heads/branch\n \n INPUT_END\n test_expect_success 'F: non-fast-forward update skips' '\n-\tif git fast-import <input\n-\tthen\n-\t\techo BAD gfi did not fail\n-\t\treturn 1\n-\telse\n-\t\tif test $old_branch = `git rev-parse --verify branch^0`\n-\t\tthen\n-\t\t\t: branch unaffected and failure returned\n-\t\t\treturn 0\n-\t\telse\n-\t\t\techo BAD gfi changed branch $old_branch\n-\t\t\treturn 1\n-\t\tfi\n-\tfi\n+\ttest_must_fail git fast-import <input &&\n+\t# branch must remain unaffected\n+\ttest $old_branch = `git rev-parse --verify branch^0`\n '\n \n test_expect_success 'F: verify pack' '\n-- \n2.6.2.337.ga235d84\n"},{"id":"273510","messageId":"52bae1a41e445d308cbfea21dfd696bc16df3cbf.1447959452.git.j6t@kdbg.org","threadId":"40837","inReplyTo":"cover.1447959452.git.j6t@kdbg.org","subject":"[PATCH 3/7] modernize t9300: use test_must_be_empty","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2015-11-19T19:09:45Z","receivedAt":"2015-11-19T19:09:45Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Instead of comparing actual output to an empty file, use\ntest_must_be_empty. In addition to the better error message provided by\nthe helper, allocation of an empty file during the setup sequence can be\navoided.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t9300-fast-import.sh | 8 +++-----\n 1 file changed, 3 insertions(+), 5 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex e9c7602..ceb3db3 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -47,8 +47,6 @@ file5_data='an inline file.\n file6_data='#!/bin/sh\n echo \"$@\"'\n \n->empty\n-\n ###\n ### series A\n ###\n@@ -2320,12 +2318,12 @@ test_expect_success !MINGW 'R: in-stream cat-blob-fd not respected' '\n \tcat-blob $blob\n \tEOF\n \ttest_cmp expect actual.3 &&\n-\ttest_cmp empty actual.1 &&\n+\ttest_must_be_empty actual.1 &&\n \tgit fast-import 3>actual.3 >actual.1 <<-EOF &&\n \toption cat-blob-fd=3\n \tcat-blob $blob\n \tEOF\n-\ttest_cmp empty actual.3 &&\n+\ttest_must_be_empty actual.3 &&\n \ttest_cmp expect actual.1\n '\n \n@@ -2549,7 +2547,7 @@ EOF\n \n test_expect_success 'R: quiet option results in no stats being output' '\n \tcat input | git fast-import 2> output &&\n-\ttest_cmp empty output\n+\ttest_must_be_empty output\n '\n \n test_expect_success 'R: feature done means terminating \"done\" is mandatory' '\n-- \n2.6.2.337.ga235d84\n"},{"id":"273515","messageId":"5b25e5967f28ee953145bb80c5d5bfc3b699baa3.1447959452.git.j6t@kdbg.org","threadId":"40837","inReplyTo":"cover.1447959452.git.j6t@kdbg.org","subject":"[PATCH 4/7] modernize t9300: wrap lines after &&","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2015-11-19T19:09:46Z","receivedAt":"2015-11-19T19:09:46Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"It is customary to have each command in test snippets on its own line.\nFix those instances that do not follow this guideline.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t9300-fast-import.sh | 48 ++++++++++++++++++++++++++++++++----------------\n 1 file changed, 32 insertions(+), 16 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex ceb3db3..c36afdb 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -130,17 +130,20 @@ test_expect_success 'A: verify tree' '\n \n echo \"$file2_data\" >expect\n test_expect_success 'A: verify file2' '\n-\tgit cat-file blob master:file2 >actual && test_cmp expect actual\n+\tgit cat-file blob master:file2 >actual &&\n+\ttest_cmp expect actual\n '\n \n echo \"$file3_data\" >expect\n test_expect_success 'A: verify file3' '\n-\tgit cat-file blob master:file3 >actual && test_cmp expect actual\n+\tgit cat-file blob master:file3 >actual &&\n+\ttest_cmp expect actual\n '\n \n printf \"$file4_data\" >expect\n test_expect_success 'A: verify file4' '\n-\tgit cat-file blob master:file4 >actual && test_cmp expect actual\n+\tgit cat-file blob master:file4 >actual &&\n+\ttest_cmp expect actual\n '\n \n cat >expect <<EOF\n@@ -1656,10 +1659,14 @@ INPUT_END\n test_expect_success 'P: superproject & submodule mix' '\n \tgit fast-import <input &&\n \tgit checkout subuse1 &&\n-\trm -rf sub && mkdir sub && (cd sub &&\n-\tgit init &&\n-\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&\n-\tgit checkout master) &&\n+\trm -rf sub &&\n+\tmkdir sub &&\n+\t(\n+\t\tcd sub &&\n+\t\tgit init &&\n+\t\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&\n+\t\tgit checkout master\n+\t) &&\n \tgit submodule init &&\n \tgit submodule update\n '\n@@ -1697,7 +1704,8 @@ INPUT_END\n \n test_expect_success 'P: verbatim SHA gitlinks' '\n \tgit branch -D sub &&\n-\tgit gc && git prune &&\n+\tgit gc &&\n+\tgit prune &&\n \tgit fast-import <input &&\n \ttest $(git rev-parse --verify subuse2) = $(git rev-parse --verify subuse1)\n '\n@@ -1942,17 +1950,20 @@ test_expect_success 'Q: verify first notes tree' '\n \n echo \"$note1_data\" >expect\n test_expect_success 'Q: verify first note for first commit' '\n-\tgit cat-file blob refs/notes/foobar~2:$commit1 >actual && test_cmp expect actual\n+\tgit cat-file blob refs/notes/foobar~2:$commit1 >actual &&\n+\ttest_cmp expect actual\n '\n \n echo \"$note2_data\" >expect\n test_expect_success 'Q: verify first note for second commit' '\n-\tgit cat-file blob refs/notes/foobar~2:$commit2 >actual && test_cmp expect actual\n+\tgit cat-file blob refs/notes/foobar~2:$commit2 >actual &&\n+\ttest_cmp expect actual\n '\n \n echo \"$note3_data\" >expect\n test_expect_success 'Q: verify first note for third commit' '\n-\tgit cat-file blob refs/notes/foobar~2:$commit3 >actual && test_cmp expect actual\n+\tgit cat-file blob refs/notes/foobar~2:$commit3 >actual &&\n+\ttest_cmp expect actual\n '\n \n cat >expect <<EOF\n@@ -1980,17 +1991,20 @@ test_expect_success 'Q: verify second notes tree' '\n \n echo \"$note1b_data\" >expect\n test_expect_success 'Q: verify second note for first commit' '\n-\tgit cat-file blob refs/notes/foobar^:$commit1 >actual && test_cmp expect actual\n+\tgit cat-file blob refs/notes/foobar^:$commit1 >actual &&\n+\ttest_cmp expect actual\n '\n \n echo \"$note2_data\" >expect\n test_expect_success 'Q: verify first note for second commit' '\n-\tgit cat-file blob refs/notes/foobar^:$commit2 >actual && test_cmp expect actual\n+\tgit cat-file blob refs/notes/foobar^:$commit2 >actual &&\n+\ttest_cmp expect actual\n '\n \n echo \"$note3_data\" >expect\n test_expect_success 'Q: verify first note for third commit' '\n-\tgit cat-file blob refs/notes/foobar^:$commit3 >actual && test_cmp expect actual\n+\tgit cat-file blob refs/notes/foobar^:$commit3 >actual &&\n+\ttest_cmp expect actual\n '\n \n cat >expect <<EOF\n@@ -2015,7 +2029,8 @@ test_expect_success 'Q: verify third notes tree' '\n \n echo \"$note1c_data\" >expect\n test_expect_success 'Q: verify third note for first commit' '\n-\tgit cat-file blob refs/notes/foobar2:$commit1 >actual && test_cmp expect actual\n+\tgit cat-file blob refs/notes/foobar2:$commit1 >actual &&\n+\ttest_cmp expect actual\n '\n \n cat >expect <<EOF\n@@ -2041,7 +2056,8 @@ test_expect_success 'Q: verify fourth notes tree' '\n \n echo \"$note2b_data\" >expect\n test_expect_success 'Q: verify second note for second commit' '\n-\tgit cat-file blob refs/notes/foobar:$commit2 >actual && test_cmp expect actual\n+\tgit cat-file blob refs/notes/foobar:$commit2 >actual &&\n+\ttest_cmp expect actual\n '\n \n cat >input <<EOF\n-- \n2.6.2.337.ga235d84\n"},{"id":"273513","messageId":"3c526bd9b7edfeb117263d785f11c18cd28e5fd7.1447959452.git.j6t@kdbg.org","threadId":"40837","inReplyTo":"cover.1447959452.git.j6t@kdbg.org","subject":"[PATCH 5/7] modernize t9300: use test_when_finished for clean-up","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2015-11-19T19:09:47Z","receivedAt":"2015-11-19T19:09:47Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"A number of clean-ups of test cases are performed outside of\ntest_expect_success. Replace these cases by using test_when_finished.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t9300-fast-import.sh | 36 ++++++++++++++++--------------------\n 1 file changed, 16 insertions(+), 20 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex c36afdb..adabd68 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -344,9 +344,9 @@ M 755 0000000000000000000000000000000000000001 zero1\n \n INPUT_END\n test_expect_success 'B: fail on invalid blob sha1' '\n+\ttest_when_finished \"rm -f .git/objects/pack_* .git/objects/index_*\" &&\n \ttest_must_fail git fast-import <input\n '\n-rm -f .git/objects/pack_* .git/objects/index_*\n \n cat >input <<INPUT_END\n commit TEMP_TAG\n@@ -359,14 +359,13 @@ from refs/heads/master\n \n INPUT_END\n test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n+\ttest_when_finished \"rm -f .git/TEMP_TAG\n+\t\tgit gc\n+\t\tgit prune\" &&\n \tgit fast-import <input &&\n \ttest -f .git/TEMP_TAG &&\n \ttest `git rev-parse master` = `git rev-parse TEMP_TAG^`\n '\n-rm -f .git/TEMP_TAG\n-\n-git gc 2>/dev/null >/dev/null\n-git prune 2>/dev/null >/dev/null\n \n cat >input <<INPUT_END\n commit refs/heads/empty-committer-1\n@@ -376,15 +375,14 @@ empty commit\n COMMIT\n INPUT_END\n test_expect_success 'B: accept empty committer' '\n+\ttest_when_finished \"git update-ref -d refs/heads/empty-committer-1\n+\t\tgit gc\n+\t\tgit prune\" &&\n \tgit fast-import <input &&\n \tout=$(git fsck) &&\n \techo \"$out\" &&\n \ttest -z \"$out\"\n '\n-git update-ref -d refs/heads/empty-committer-1 || true\n-\n-git gc 2>/dev/null >/dev/null\n-git prune 2>/dev/null >/dev/null\n \n cat >input <<INPUT_END\n commit refs/heads/empty-committer-2\n@@ -394,15 +392,14 @@ empty commit\n COMMIT\n INPUT_END\n test_expect_success 'B: accept and fixup committer with no name' '\n+\ttest_when_finished \"git update-ref -d refs/heads/empty-committer-2\n+\t\tgit gc\n+\t\tgit prune\" &&\n \tgit fast-import <input &&\n \tout=$(git fsck) &&\n \techo \"$out\" &&\n \ttest -z \"$out\"\n '\n-git update-ref -d refs/heads/empty-committer-2 || true\n-\n-git gc 2>/dev/null >/dev/null\n-git prune 2>/dev/null >/dev/null\n \n cat >input <<INPUT_END\n commit refs/heads/invalid-committer\n@@ -412,9 +409,9 @@ empty commit\n COMMIT\n INPUT_END\n test_expect_success 'B: fail on invalid committer (1)' '\n+\ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n-git update-ref -d refs/heads/invalid-committer || true\n \n cat >input <<INPUT_END\n commit refs/heads/invalid-committer\n@@ -424,9 +421,9 @@ empty commit\n COMMIT\n INPUT_END\n test_expect_success 'B: fail on invalid committer (2)' '\n+\ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n-git update-ref -d refs/heads/invalid-committer || true\n \n cat >input <<INPUT_END\n commit refs/heads/invalid-committer\n@@ -436,9 +433,9 @@ empty commit\n COMMIT\n INPUT_END\n test_expect_success 'B: fail on invalid committer (3)' '\n+\ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n-git update-ref -d refs/heads/invalid-committer || true\n \n cat >input <<INPUT_END\n commit refs/heads/invalid-committer\n@@ -448,9 +445,9 @@ empty commit\n COMMIT\n INPUT_END\n test_expect_success 'B: fail on invalid committer (4)' '\n+\ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n-git update-ref -d refs/heads/invalid-committer || true\n \n cat >input <<INPUT_END\n commit refs/heads/invalid-committer\n@@ -460,9 +457,9 @@ empty commit\n COMMIT\n INPUT_END\n test_expect_success 'B: fail on invalid committer (5)' '\n+\ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n-git update-ref -d refs/heads/invalid-committer || true\n \n ###\n ### series C\n@@ -914,6 +911,7 @@ g/b/h\n EOF\n \n test_expect_success 'L: nested tree copy does not corrupt deltas' '\n+\ttest_when_finished \"git update-ref -d refs/heads/L2\" &&\n \tgit fast-import <input &&\n \tgit ls-tree L2 g/b/ >tmp &&\n \tcat tmp | cut -f 2 >actual &&\n@@ -921,8 +919,6 @@ test_expect_success 'L: nested tree copy does not corrupt deltas' '\n \tgit fsck `git rev-parse L2`\n '\n \n-git update-ref -d refs/heads/L2\n-\n ###\n ### series M\n ###\n-- \n2.6.2.337.ga235d84\n"},{"id":"273512","messageId":"9d4bc5a63e49d7f04f5fa3b9aef8a0af916736a0.1447959452.git.j6t@kdbg.org","threadId":"40837","inReplyTo":"cover.1447959452.git.j6t@kdbg.org","subject":"[PATCH 6/7] modernize t9300: mark here-doc words to ignore tab indentation","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2015-11-19T19:09:48Z","receivedAt":"2015-11-19T19:09:48Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"In the next commit, we will indent test case preparations. This will\nrequire that here-documents ignore the tab indentation. Prepare for\nthis change by marking the here-doc words accordingly. This does not\nhave an effect now, but will remove some noise from the git diff -b\noutput of the next commit.\n\nThe change here is entirely automated with this perl command:\n\n  perl -i -lpe 's/(cat.*<<) *((EOF|(EXPECT|INPUT)_END).*$)/$1-$2 &&/' t/t9300-fast-import.sh\n\ni.e., inserts a dash between << and the EOF word (and removes blanks\nthat our style guide abhors) and appends the && that will become\nnecessary.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t9300-fast-import.sh | 200 ++++++++++++++++++++++++-------------------------\n 1 file changed, 100 insertions(+), 100 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex adabd68..7586f41 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -57,7 +57,7 @@ test_expect_success 'empty stream succeeds' '\n \tgit fast-import </dev/null\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n blob\n mark :2\n data <<EOF\n@@ -107,7 +107,7 @@ test_expect_success 'A: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n@@ -118,7 +118,7 @@ test_expect_success 'A: verify commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n 100644 blob file2\n 100644 blob file3\n 100755 blob file4\n@@ -146,7 +146,7 @@ test_expect_success 'A: verify file4' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n object $(git rev-parse refs/heads/master)\n type commit\n tag series-A\n@@ -158,7 +158,7 @@ test_expect_success 'A: verify tag/series-A' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n object $(git rev-parse refs/heads/master:file3)\n type blob\n tag series-A-blob\n@@ -170,7 +170,7 @@ test_expect_success 'A: verify tag/series-A-blob' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :2 `git rev-parse --verify master:file2`\n :3 `git rev-parse --verify master:file3`\n :4 `git rev-parse --verify master:file4`\n@@ -190,7 +190,7 @@ test_expect_success 'A: verify marks import' '\n \n test_tick\n new_blob=$(echo testing | git hash-object --stdin)\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n tag series-A-blob-2\n from $(git rev-parse refs/heads/master:file3)\n data <<EOF\n@@ -217,7 +217,7 @@ Tag new_blob.\n EOF\n INPUT_END\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n object $(git rev-parse refs/heads/master:file3)\n type blob\n tag series-A-blob-2\n@@ -238,7 +238,7 @@ test_expect_success 'A: tag blob by sha1' '\n '\n \n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/verify--import-marks\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -258,7 +258,7 @@ test_expect_success 'A: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :000000 100755 0000000000000000000000000000000000000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 A\tcopy-of-file2\n EOF\n git diff-tree -M -r master verify--import-marks >actual\n@@ -274,7 +274,7 @@ mt=$(git hash-object --stdin < /dev/null)\n : >marks.exp\n : >tree.exp\n \n-cat >input.commit <<EOF\n+cat >input.commit <<-EOF &&\n commit refs/heads/verify--dump-marks\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -287,7 +287,7 @@ l=4\n m=6\n n=7\n while test \"$i\" -lt 27; do\n-    cat >>input.blob <<EOF\n+    cat >>input.blob <<-EOF &&\n blob\n mark :$l\n data 0\n@@ -331,7 +331,7 @@ test_expect_success 'A: export marks with large values' '\n ###\n \n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/branch\n mark :1\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -348,7 +348,7 @@ test_expect_success 'B: fail on invalid blob sha1' '\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit TEMP_TAG\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -367,7 +367,7 @@ test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n \ttest `git rev-parse master` = `git rev-parse TEMP_TAG^`\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/empty-committer-1\n committer  <> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -384,7 +384,7 @@ test_expect_success 'B: accept empty committer' '\n \ttest -z \"$out\"\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/empty-committer-2\n committer <a@b.com> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -401,7 +401,7 @@ test_expect_success 'B: accept and fixup committer with no name' '\n \ttest -z \"$out\"\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/invalid-committer\n committer Name email> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -413,7 +413,7 @@ test_expect_success 'B: fail on invalid committer (1)' '\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/invalid-committer\n committer Name <e<mail> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -425,7 +425,7 @@ test_expect_success 'B: fail on invalid committer (2)' '\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/invalid-committer\n committer Name <email>> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -437,7 +437,7 @@ test_expect_success 'B: fail on invalid committer (3)' '\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/invalid-committer\n committer Name <email $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -449,7 +449,7 @@ test_expect_success 'B: fail on invalid committer (4)' '\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/invalid-committer\n committer Name<email> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -468,7 +468,7 @@ test_expect_success 'B: fail on invalid committer (5)' '\n newf=`echo hi newf | git hash-object -w --stdin`\n oldf=`git rev-parse --verify master:file2`\n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/branch\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -495,7 +495,7 @@ test_expect_success 'C: validate reuse existing blob' '\n \ttest $oldf = `git rev-parse --verify branch:file2/oldf`\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n parent `git rev-parse --verify master^0`\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -507,7 +507,7 @@ test_expect_success 'C: verify commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A\tfile2/newf\n :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 R100\tfile2\tfile2/oldf\n :100644 000000 0d92e9f3374ae2947c23aa477cbc68ce598135f1 0000000000000000000000000000000000000000 D\tfile3\n@@ -522,7 +522,7 @@ test_expect_success 'C: validate rename result' '\n ###\n \n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/branch\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -550,7 +550,7 @@ test_expect_success 'D: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :000000 100755 0000000000000000000000000000000000000000 e74b7d465e52746be2b4bae983670711e6e66657 A\tnewdir/exec.sh\n :000000 100644 0000000000000000000000000000000000000000 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 A\tnewdir/interesting\n EOF\n@@ -575,7 +575,7 @@ test_expect_success 'D: verify file6' '\n ### series E\n ###\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/branch\n author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> Tue Feb 6 11:22:18 2007 -0500\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> Tue Feb 6 12:35:02 2007 -0500\n@@ -597,7 +597,7 @@ test_expect_success 'E: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 1170778938 -0500\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1170783302 -0500\n \n@@ -614,7 +614,7 @@ test_expect_success 'E: verify commit' '\n \n old_branch=`git rev-parse --verify branch^0`\n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/branch\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -637,7 +637,7 @@ test_expect_success 'F: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n tree `git rev-parse branch~1^{tree}`\n parent `git rev-parse branch~1`\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -656,7 +656,7 @@ test_expect_success 'F: verify other commit' '\n \n old_branch=`git rev-parse --verify branch^0`\n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/branch\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -684,7 +684,7 @@ test_expect_success 'G: branch changed, but logged' '\n ###\n \n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/H\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -713,7 +713,7 @@ test_expect_success 'H: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100755 000000 f1fb5da718392694d0076d677d6d0e364c79b0bc 0000000000000000000000000000000000000000 D\tfile2/newf\n :100644 000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 0000000000000000000000000000000000000000 D\tfile2/oldf\n :100755 000000 85df50785d62d3b05ab03d9cbf7e4a0b49449730 0000000000000000000000000000000000000000 D\tfile4\n@@ -735,7 +735,7 @@ test_expect_success 'H: verify file' '\n ### series I\n ###\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/export-boundary\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -749,7 +749,7 @@ test_expect_success 'I: export-pack-edges' '\n \tgit fast-import --export-pack-edges=edges.list <input\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n .git/objects/pack/pack-.pack: `git rev-parse --verify export-boundary`\n EOF\n test_expect_success 'I: verify edge list' '\n@@ -761,7 +761,7 @@ test_expect_success 'I: verify edge list' '\n ### series J\n ###\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/J\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -787,7 +787,7 @@ test_expect_success 'J: branch has 1 commit, empty tree' '\n \ttest 0 = `git ls-tree J | wc -l`\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n reset refs/heads/J2\n \n tag wrong_tag\n@@ -803,7 +803,7 @@ test_expect_success 'J: tag must fail on empty branch' '\n ### series K\n ###\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/K\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -833,7 +833,7 @@ test_expect_success 'K: verify K^1 = branch^1' '\n ### series L\n ###\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n blob\n mark :1\n data <<EOF\n@@ -867,7 +867,7 @@ M 644 :2 b/other\n M 644 :2 ba\n INPUT_END\n \n-cat >expect <<EXPECT_END\n+cat >expect <<-EXPECT_END &&\n :100644 100644 4268632... 55d3a52... M\tb.\n :040000 040000 0ae5cac... 443c768... M\tb\n :100644 100644 4268632... 55d3a52... M\tba\n@@ -879,7 +879,7 @@ test_expect_success 'L: verify internal tree sorting' '\n \ttest_cmp expect output\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n blob\n mark :1\n data <<EOF\n@@ -905,7 +905,7 @@ C a/e g/b\n M 644 :1 g/b/h\n INPUT_END\n \n-cat <<EOF >expect\n+cat <<-EOF >expect &&\n g/b/f\n g/b/h\n EOF\n@@ -924,7 +924,7 @@ test_expect_success 'L: nested tree copy does not corrupt deltas' '\n ###\n \n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/M1\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -936,7 +936,7 @@ R file2/newf file2/n.e.w.f\n \n INPUT_END\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\tfile2/newf\tfile2/n.e.w.f\n EOF\n test_expect_success 'M: rename file in same subdirectory' '\n@@ -945,7 +945,7 @@ test_expect_success 'M: rename file in same subdirectory' '\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/M2\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -957,7 +957,7 @@ R file2/newf i/am/new/to/you\n \n INPUT_END\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\tfile2/newf\ti/am/new/to/you\n EOF\n test_expect_success 'M: rename file to new subdirectory' '\n@@ -966,7 +966,7 @@ test_expect_success 'M: rename file to new subdirectory' '\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/M3\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -978,7 +978,7 @@ R i other/sub\n \n INPUT_END\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\ti/am/new/to/you\tother/sub/am/new/to/you\n EOF\n test_expect_success 'M: rename subdirectory to new subdirectory' '\n@@ -987,7 +987,7 @@ test_expect_success 'M: rename subdirectory to new subdirectory' '\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/M4\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -999,7 +999,7 @@ R \"\" sub\n \n INPUT_END\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 R100\tfile2/oldf\tsub/file2/oldf\n :100755 100755 85df50785d62d3b05ab03d9cbf7e4a0b49449730 85df50785d62d3b05ab03d9cbf7e4a0b49449730 R100\tfile4\tsub/file4\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\ti/am/new/to/you\tsub/i/am/new/to/you\n@@ -1018,7 +1018,7 @@ test_expect_success 'M: rename root to subdirectory' '\n ###\n \n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/N1\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -1030,7 +1030,7 @@ C file2/newf file2/n.e.w.f\n \n INPUT_END\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile2/n.e.w.f\n EOF\n test_expect_success 'N: copy file in same subdirectory' '\n@@ -1039,7 +1039,7 @@ test_expect_success 'N: copy file in same subdirectory' '\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/N2\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -1062,7 +1062,7 @@ EOF\n \n INPUT_END\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100\tnewdir/interesting\tfile3/file5\n :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile3/newf\n :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100\tfile2/oldf\tfile3/oldf\n@@ -1073,7 +1073,7 @@ test_expect_success 'N: copy then modify subdirectory' '\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/N3\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -1457,7 +1457,7 @@ test_expect_success 'N: modify subtree, extract it, and modify again' '\n ### series O\n ###\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n #we will\n commit refs/heads/O1\n # -- ignore all of this text\n@@ -1493,7 +1493,7 @@ test_expect_success 'O: comments are all skipped' '\n \ttest `git rev-parse N3` = `git rev-parse O1`\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/O2\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -1518,7 +1518,7 @@ test_expect_success 'O: repack before next test' '\n \tgit repack -a -d\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/O3\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -1548,7 +1548,7 @@ reset refs/tags/O3-3rd\n from :5\n INPUT_END\n \n-cat >expect <<INPUT_END\n+cat >expect <<-INPUT_END &&\n string\n of\n empty\n@@ -1562,7 +1562,7 @@ test_expect_success 'O: blank lines not necessary after other commands' '\n \ttest_cmp expect actual\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/O4\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -1597,7 +1597,7 @@ test_expect_success 'O: progress outputs as requested by input' '\n ### series P (gitlinks)\n ###\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n blob\n mark :1\n data 10\n@@ -1670,7 +1670,7 @@ test_expect_success 'P: superproject & submodule mix' '\n SUBLAST=$(git rev-parse --verify sub)\n SUBPREV=$(git rev-parse --verify sub^)\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n blob\n mark :1\n data <<DATAEND\n@@ -1707,7 +1707,7 @@ test_expect_success 'P: verbatim SHA gitlinks' '\n '\n \n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/subuse3\n mark :1\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -1728,7 +1728,7 @@ test_expect_success 'P: fail on inline gitlink' '\n '\n \n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n blob\n mark :1\n data <<DATA\n@@ -1763,7 +1763,7 @@ note1c_data=\"The third note for the first commit\"\n note2b_data=\"The second note for the second commit\"\n \n test_tick\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n blob\n mark :2\n data <<EOF\n@@ -1887,7 +1887,7 @@ commit1=$(git rev-parse notes-test~2)\n commit2=$(git rev-parse notes-test^)\n commit3=$(git rev-parse notes-test)\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n@@ -1898,7 +1898,7 @@ test_expect_success 'Q: verify first commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n parent $commit1\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -1910,7 +1910,7 @@ test_expect_success 'Q: verify second commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n parent $commit2\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -1922,7 +1922,7 @@ test_expect_success 'Q: verify third commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n@@ -1933,7 +1933,7 @@ test_expect_success 'Q: verify first notes commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect.unsorted <<EOF\n+cat >expect.unsorted <<-EOF &&\n 100644 blob $commit1\n 100644 blob $commit2\n 100644 blob $commit3\n@@ -1962,7 +1962,7 @@ test_expect_success 'Q: verify first note for third commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n parent `git rev-parse --verify refs/notes/foobar~2`\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -1974,7 +1974,7 @@ test_expect_success 'Q: verify second notes commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect.unsorted <<EOF\n+cat >expect.unsorted <<-EOF &&\n 100644 blob $commit1\n 100644 blob $commit2\n 100644 blob $commit3\n@@ -2003,7 +2003,7 @@ test_expect_success 'Q: verify first note for third commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n@@ -2014,7 +2014,7 @@ test_expect_success 'Q: verify third notes commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect.unsorted <<EOF\n+cat >expect.unsorted <<-EOF &&\n 100644 blob $commit1\n EOF\n cat expect.unsorted | sort >expect\n@@ -2029,7 +2029,7 @@ test_expect_success 'Q: verify third note for first commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n parent `git rev-parse --verify refs/notes/foobar^`\n author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -2041,7 +2041,7 @@ test_expect_success 'Q: verify fourth notes commit' '\n \ttest_cmp expect actual\n '\n \n-cat >expect.unsorted <<EOF\n+cat >expect.unsorted <<-EOF &&\n 100644 blob $commit2\n EOF\n cat expect.unsorted | sort >expect\n@@ -2056,7 +2056,7 @@ test_expect_success 'Q: verify second note for second commit' '\n \ttest_cmp expect actual\n '\n \n-cat >input <<EOF\n+cat >input <<-EOF &&\n reset refs/heads/Q0\n \n commit refs/heads/note-Q0\n@@ -2077,7 +2077,7 @@ test_expect_success 'Q: deny note on empty branch' '\n ### series R (feature and option)\n ###\n \n-cat >input <<EOF\n+cat >input <<-EOF &&\n feature no-such-feature-exists\n EOF\n \n@@ -2085,7 +2085,7 @@ test_expect_success 'R: abort on unsupported feature' '\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<EOF\n+cat >input <<-EOF &&\n feature date-format=now\n EOF\n \n@@ -2093,7 +2093,7 @@ test_expect_success 'R: supported feature is accepted' '\n \tgit fast-import <input\n '\n \n-cat >input << EOF\n+cat >input <<-EOF &&\n blob\n data 3\n hi\n@@ -2104,7 +2104,7 @@ test_expect_success 'R: abort on receiving feature after data command' '\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input << EOF\n+cat >input <<-EOF &&\n feature import-marks=git.marks\n feature import-marks=git2.marks\n EOF\n@@ -2113,7 +2113,7 @@ test_expect_success 'R: only one import-marks feature allowed per stream' '\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input << EOF\n+cat >input <<-EOF &&\n feature export-marks=git.marks\n blob\n mark :1\n@@ -2234,7 +2234,7 @@ test_expect_success 'R: feature import-marks-if-exists' '\n \ttest_cmp expect io.marks\n '\n \n-cat >input << EOF\n+cat >input <<-EOF &&\n feature import-marks=marks.out\n feature export-marks=marks.new\n EOF\n@@ -2244,7 +2244,7 @@ test_expect_success 'R: import to output marks works without any content' '\n \ttest_cmp marks.out marks.new\n '\n \n-cat >input <<EOF\n+cat >input <<-EOF &&\n feature import-marks=nonexistent.marks\n feature export-marks=marks.new\n EOF\n@@ -2255,7 +2255,7 @@ test_expect_success 'R: import marks prefers commandline marks file over the str\n '\n \n \n-cat >input <<EOF\n+cat >input <<-EOF &&\n feature import-marks=nonexistent.marks\n feature export-marks=combined.marks\n EOF\n@@ -2267,7 +2267,7 @@ test_expect_success 'R: multiple --import-marks= should be honoured' '\n \ttest_cmp marks.out combined.marks\n '\n \n-cat >input <<EOF\n+cat >input <<-EOF &&\n feature relative-marks\n feature import-marks=relative.in\n feature export-marks=relative.out\n@@ -2280,7 +2280,7 @@ test_expect_success 'R: feature relative-marks should be honoured' '\n \ttest_cmp marks.new .git/info/fast-import/relative.out\n '\n \n-cat >input <<EOF\n+cat >input <<-EOF &&\n feature relative-marks\n feature import-marks=relative.in\n feature no-relative-marks\n@@ -2549,7 +2549,7 @@ test_expect_success PIPE 'R: print staged blob within commit' '\n \ttest_cmp expect actual\n '\n \n-cat >input << EOF\n+cat >input <<-EOF &&\n option git quiet\n blob\n data 3\n@@ -2604,7 +2604,7 @@ test_expect_success 'R: terminating \"done\" within commit' '\n \ttest_cmp expect actual\n '\n \n-cat >input <<EOF\n+cat >input <<-EOF &&\n option git non-existing-option\n EOF\n \n@@ -2624,7 +2624,7 @@ test_expect_success 'R: die on invalid option argument' '\n \ttest_must_fail git fast-import --depth=\"5 elephants\" </dev/null\n '\n \n-cat >input <<EOF\n+cat >input <<-EOF &&\n option non-existing-vcs non-existing-option\n EOF\n \n@@ -2637,7 +2637,7 @@ test_expect_success 'R: ignore non-git options' '\n ##\n blobsize=$((2*1024*1024 + 53))\n test-genrandom bar $blobsize >expect\n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/big-file\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -2648,7 +2648,7 @@ M 644 inline big1\n data $blobsize\n INPUT_END\n cat expect >>input\n-cat >>input <<INPUT_END\n+cat >>input <<-INPUT_END &&\n M 644 inline big2\n data $blobsize\n INPUT_END\n@@ -2713,7 +2713,7 @@ test_expect_success 'R: blob appears only once' '\n #\n test_tick\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/S\n mark :301\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n@@ -3002,7 +3002,7 @@ test_expect_success 'T: empty reset doesnt delete branch' '\n ### series U (filedelete)\n ###\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/U\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -3027,7 +3027,7 @@ test_expect_success 'U: initialize for U tests' '\n \tgit fast-import <input\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/U\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -3042,7 +3042,7 @@ test_expect_success 'U: filedelete file succeeds' '\n \tgit fast-import <input\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100644 000000 2907ebb4bf85d91bf0716bb3bd8a68ef48d6da76 0000000000000000000000000000000000000000 D\tgood/night.txt\n EOF\n \n@@ -3052,7 +3052,7 @@ test_expect_success 'U: validate file delete result' '\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/U\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -3067,7 +3067,7 @@ test_expect_success 'U: filedelete directory succeeds' '\n \tgit fast-import <input\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100644 000000 69cb75792f55123d8389c156b0b41c2ff00ed507 0000000000000000000000000000000000000000 D\tgood/bye.txt\n EOF\n \n@@ -3077,7 +3077,7 @@ test_expect_success 'U: validate directory delete result' '\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<INPUT_END\n+cat >input <<-INPUT_END &&\n commit refs/heads/U\n committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n data <<COMMIT\n@@ -3092,7 +3092,7 @@ test_expect_success 'U: filedelete root succeeds' '\n \tgit fast-import <input\n '\n \n-cat >expect <<EOF\n+cat >expect <<-EOF &&\n :100644 000000 c18147dc648481eeb65dc5e66628429a64843327 0000000000000000000000000000000000000000 D\thello.c\n EOF\n \n-- \n2.6.2.337.ga235d84\n"},{"id":"273514","messageId":"6362bf1eb3c11ae379bf4414577de363e8575882.1447959452.git.j6t@kdbg.org","threadId":"40837","inReplyTo":"cover.1447959452.git.j6t@kdbg.org","subject":"[PATCH 7/7] modernize t9300: move test preparations into test_expect_success","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2015-11-19T19:09:49Z","receivedAt":"2015-11-19T19:09:49Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Our usual style these days is to execute everything inside\ntest_expect_success. Make it so.\n\nSigned-off-by: Johannes Sixt <j6t@kdbg.org>\n---\n t/t9300-fast-import.sh | 2580 ++++++++++++++++++++++++------------------------\n 1 file changed, 1297 insertions(+), 1283 deletions(-)\n\ndiff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh\nindex 7586f41..14a9384 100755\n--- a/t/t9300-fast-import.sh\n+++ b/t/t9300-fast-import.sh\n@@ -51,54 +51,53 @@ echo \"$@\"'\n ### series A\n ###\n \n-test_tick\n-\n test_expect_success 'empty stream succeeds' '\n \tgit fast-import </dev/null\n '\n \n-cat >input <<-INPUT_END &&\n-blob\n-mark :2\n-data <<EOF\n-$file2_data\n-EOF\n-\n-blob\n-mark :3\n-data <<END\n-$file3_data\n-END\n-\n-blob\n-mark :4\n-data $file4_len\n-$file4_data\n-commit refs/heads/master\n-mark :5\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-initial\n-COMMIT\n-\n-M 644 :2 file2\n-M 644 :3 file3\n-M 755 :4 file4\n-\n-tag series-A\n-from :5\n-data <<EOF\n-An annotated tag without a tagger\n-EOF\n-\n-tag series-A-blob\n-from :3\n-data <<EOF\n-An annotated tag that annotates a blob.\n-EOF\n-\n-INPUT_END\n test_expect_success 'A: create pack from stdin' '\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tblob\n+\tmark :2\n+\tdata <<EOF\n+\t$file2_data\n+\tEOF\n+\n+\tblob\n+\tmark :3\n+\tdata <<END\n+\t$file3_data\n+\tEND\n+\n+\tblob\n+\tmark :4\n+\tdata $file4_len\n+\t$file4_data\n+\tcommit refs/heads/master\n+\tmark :5\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tinitial\n+\tCOMMIT\n+\n+\tM 644 :2 file2\n+\tM 644 :3 file3\n+\tM 755 :4 file4\n+\n+\ttag series-A\n+\tfrom :5\n+\tdata <<EOF\n+\tAn annotated tag without a tagger\n+\tEOF\n+\n+\ttag series-A-blob\n+\tfrom :3\n+\tdata <<EOF\n+\tAn annotated tag that annotates a blob.\n+\tEOF\n+\n+\tINPUT_END\n \tgit fast-import --export-marks=marks.out <input &&\n \tgit whatchanged master\n '\n@@ -107,76 +106,76 @@ test_expect_success 'A: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<-EOF &&\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-\n-initial\n-EOF\n test_expect_success 'A: verify commit' '\n+\tcat >expect <<-EOF &&\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\n+\tinitial\n+\tEOF\n \tgit cat-file commit master | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-100644 blob file2\n-100644 blob file3\n-100755 blob file4\n-EOF\n test_expect_success 'A: verify tree' '\n+\tcat >expect <<-EOF &&\n+\t100644 blob file2\n+\t100644 blob file3\n+\t100755 blob file4\n+\tEOF\n \tgit cat-file -p master^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$file2_data\" >expect\n test_expect_success 'A: verify file2' '\n+\techo \"$file2_data\" >expect &&\n \tgit cat-file blob master:file2 >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$file3_data\" >expect\n test_expect_success 'A: verify file3' '\n+\techo \"$file3_data\" >expect &&\n \tgit cat-file blob master:file3 >actual &&\n \ttest_cmp expect actual\n '\n \n-printf \"$file4_data\" >expect\n test_expect_success 'A: verify file4' '\n+\tprintf \"$file4_data\" >expect &&\n \tgit cat-file blob master:file4 >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-object $(git rev-parse refs/heads/master)\n-type commit\n-tag series-A\n-\n-An annotated tag without a tagger\n-EOF\n test_expect_success 'A: verify tag/series-A' '\n+\tcat >expect <<-EOF &&\n+\tobject $(git rev-parse refs/heads/master)\n+\ttype commit\n+\ttag series-A\n+\n+\tAn annotated tag without a tagger\n+\tEOF\n \tgit cat-file tag tags/series-A >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-object $(git rev-parse refs/heads/master:file3)\n-type blob\n-tag series-A-blob\n-\n-An annotated tag that annotates a blob.\n-EOF\n test_expect_success 'A: verify tag/series-A-blob' '\n+\tcat >expect <<-EOF &&\n+\tobject $(git rev-parse refs/heads/master:file3)\n+\ttype blob\n+\ttag series-A-blob\n+\n+\tAn annotated tag that annotates a blob.\n+\tEOF\n \tgit cat-file tag tags/series-A-blob >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-:2 `git rev-parse --verify master:file2`\n-:3 `git rev-parse --verify master:file3`\n-:4 `git rev-parse --verify master:file4`\n-:5 `git rev-parse --verify master^0`\n-EOF\n test_expect_success 'A: verify marks output' '\n+\tcat >expect <<-EOF &&\n+\t:2 `git rev-parse --verify master:file2`\n+\t:3 `git rev-parse --verify master:file3`\n+\t:4 `git rev-parse --verify master:file4`\n+\t:5 `git rev-parse --verify master^0`\n+\tEOF\n \ttest_cmp expect marks.out\n '\n \n@@ -188,68 +187,69 @@ test_expect_success 'A: verify marks import' '\n \ttest_cmp expect marks.new\n '\n \n-test_tick\n-new_blob=$(echo testing | git hash-object --stdin)\n-cat >input <<-INPUT_END &&\n-tag series-A-blob-2\n-from $(git rev-parse refs/heads/master:file3)\n-data <<EOF\n-Tag blob by sha1.\n-EOF\n-\n-blob\n-mark :6\n-data <<EOF\n-testing\n-EOF\n-\n-commit refs/heads/new_blob\n-committer  <> 0 +0000\n-data 0\n-M 644 :6 new_blob\n-#pretend we got sha1 from fast-import\n-ls \"new_blob\"\n-\n-tag series-A-blob-3\n-from $new_blob\n-data <<EOF\n-Tag new_blob.\n-EOF\n-INPUT_END\n-\n-cat >expect <<-EOF &&\n-object $(git rev-parse refs/heads/master:file3)\n-type blob\n-tag series-A-blob-2\n-\n-Tag blob by sha1.\n-object $new_blob\n-type blob\n-tag series-A-blob-3\n-\n-Tag new_blob.\n-EOF\n-\n test_expect_success 'A: tag blob by sha1' '\n+\ttest_tick &&\n+\tnew_blob=$(echo testing | git hash-object --stdin) &&\n+\tcat >input <<-INPUT_END &&\n+\ttag series-A-blob-2\n+\tfrom $(git rev-parse refs/heads/master:file3)\n+\tdata <<EOF\n+\tTag blob by sha1.\n+\tEOF\n+\n+\tblob\n+\tmark :6\n+\tdata <<EOF\n+\ttesting\n+\tEOF\n+\n+\tcommit refs/heads/new_blob\n+\tcommitter  <> 0 +0000\n+\tdata 0\n+\tM 644 :6 new_blob\n+\t#pretend we got sha1 from fast-import\n+\tls \"new_blob\"\n+\n+\ttag series-A-blob-3\n+\tfrom $new_blob\n+\tdata <<EOF\n+\tTag new_blob.\n+\tEOF\n+\tINPUT_END\n+\n+\tcat >expect <<-EOF &&\n+\tobject $(git rev-parse refs/heads/master:file3)\n+\ttype blob\n+\ttag series-A-blob-2\n+\n+\tTag blob by sha1.\n+\tobject $new_blob\n+\ttype blob\n+\ttag series-A-blob-3\n+\n+\tTag new_blob.\n+\tEOF\n+\n \tgit fast-import <input &&\n \tgit cat-file tag tags/series-A-blob-2 >actual &&\n \tgit cat-file tag tags/series-A-blob-3 >>actual &&\n \ttest_cmp expect actual\n '\n \n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/verify--import-marks\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-recreate from :5\n-COMMIT\n+test_expect_success 'A: verify marks import does not crash' '\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/verify--import-marks\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\trecreate from :5\n+\tCOMMIT\n+\n+\tfrom :5\n+\tM 755 :2 copy-of-file2\n \n-from :5\n-M 755 :2 copy-of-file2\n+\tINPUT_END\n \n-INPUT_END\n-test_expect_success 'A: verify marks import does not crash' '\n \tgit fast-import --import-marks=marks.out <input &&\n \tgit whatchanged verify--import-marks\n '\n@@ -258,68 +258,66 @@ test_expect_success 'A: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<-EOF &&\n-:000000 100755 0000000000000000000000000000000000000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 A\tcopy-of-file2\n-EOF\n-git diff-tree -M -r master verify--import-marks >actual\n test_expect_success 'A: verify diff' '\n+\tcat >expect <<-EOF &&\n+\t:000000 100755 0000000000000000000000000000000000000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 A\tcopy-of-file2\n+\tEOF\n+\tgit diff-tree -M -r master verify--import-marks >actual &&\n \tcompare_diff_raw expect actual &&\n \ttest `git rev-parse --verify master:file2` \\\n \t    = `git rev-parse --verify verify--import-marks:copy-of-file2`\n '\n \n-test_tick\n-mt=$(git hash-object --stdin < /dev/null)\n-: >input.blob\n-: >marks.exp\n-: >tree.exp\n-\n-cat >input.commit <<-EOF &&\n-commit refs/heads/verify--dump-marks\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-test the sparse array dumping routines with exponentially growing marks\n-COMMIT\n-EOF\n-\n-i=0\n-l=4\n-m=6\n-n=7\n-while test \"$i\" -lt 27; do\n-    cat >>input.blob <<-EOF &&\n-blob\n-mark :$l\n-data 0\n-blob\n-mark :$m\n-data 0\n-blob\n-mark :$n\n-data 0\n-EOF\n-    echo \"M 100644 :$l l$i\" >>input.commit\n-    echo \"M 100644 :$m m$i\" >>input.commit\n-    echo \"M 100644 :$n n$i\" >>input.commit\n-\n-    echo \":$l $mt\" >>marks.exp\n-    echo \":$m $mt\" >>marks.exp\n-    echo \":$n $mt\" >>marks.exp\n-\n-    printf \"100644 blob $mt\\tl$i\\n\" >>tree.exp\n-    printf \"100644 blob $mt\\tm$i\\n\" >>tree.exp\n-    printf \"100644 blob $mt\\tn$i\\n\" >>tree.exp\n-\n-    l=$(($l + $l))\n-    m=$(($m + $m))\n-    n=$(($l + $n))\n-\n-    i=$((1 + $i))\n-done\n-\n-sort tree.exp > tree.exp_s\n-\n test_expect_success 'A: export marks with large values' '\n+\ttest_tick &&\n+\tmt=$(git hash-object --stdin < /dev/null) &&\n+\t>input.blob &&\n+\t>marks.exp &&\n+\t>tree.exp &&\n+\n+\tcat >input.commit <<-EOF &&\n+\tcommit refs/heads/verify--dump-marks\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\ttest the sparse array dumping routines with exponentially growing marks\n+\tCOMMIT\n+\tEOF\n+\n+\ti=0 l=4 m=6 n=7 &&\n+\twhile test \"$i\" -lt 27\n+\tdo\n+\t\tcat >>input.blob <<-EOF &&\n+\t\tblob\n+\t\tmark :$l\n+\t\tdata 0\n+\t\tblob\n+\t\tmark :$m\n+\t\tdata 0\n+\t\tblob\n+\t\tmark :$n\n+\t\tdata 0\n+\t\tEOF\n+\t\techo \"M 100644 :$l l$i\" >>input.commit &&\n+\t\techo \"M 100644 :$m m$i\" >>input.commit &&\n+\t\techo \"M 100644 :$n n$i\" >>input.commit &&\n+\n+\t\techo \":$l $mt\" >>marks.exp &&\n+\t\techo \":$m $mt\" >>marks.exp &&\n+\t\techo \":$n $mt\" >>marks.exp &&\n+\n+\t\tprintf \"100644 blob $mt\\tl$i\\n\" >>tree.exp &&\n+\t\tprintf \"100644 blob $mt\\tm$i\\n\" >>tree.exp &&\n+\t\tprintf \"100644 blob $mt\\tn$i\\n\" >>tree.exp &&\n+\n+\t\tl=$(($l + $l)) &&\n+\t\tm=$(($m + $m)) &&\n+\t\tn=$(($l + $n)) &&\n+\n+\t\ti=$((1 + $i)) || return 1\n+\tdone &&\n+\n+\tsort tree.exp > tree.exp_s &&\n+\n \tcat input.blob input.commit | git fast-import --export-marks=marks.large &&\n \tgit ls-tree refs/heads/verify--dump-marks >tree.out &&\n \ttest_cmp tree.exp_s tree.out &&\n@@ -330,35 +328,37 @@ test_expect_success 'A: export marks with large values' '\n ### series B\n ###\n \n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/branch\n-mark :1\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-corrupt\n-COMMIT\n+test_expect_success 'B: fail on invalid blob sha1' '\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/branch\n+\tmark :1\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tcorrupt\n+\tCOMMIT\n+\n+\tfrom refs/heads/master\n+\tM 755 0000000000000000000000000000000000000001 zero1\n \n-from refs/heads/master\n-M 755 0000000000000000000000000000000000000001 zero1\n+\tINPUT_END\n \n-INPUT_END\n-test_expect_success 'B: fail on invalid blob sha1' '\n \ttest_when_finished \"rm -f .git/objects/pack_* .git/objects/index_*\" &&\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<-INPUT_END &&\n-commit TEMP_TAG\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-tag base\n-COMMIT\n+test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit TEMP_TAG\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\ttag base\n+\tCOMMIT\n+\n+\tfrom refs/heads/master\n \n-from refs/heads/master\n+\tINPUT_END\n \n-INPUT_END\n-test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n \ttest_when_finished \"rm -f .git/TEMP_TAG\n \t\tgit gc\n \t\tgit prune\" &&\n@@ -367,14 +367,15 @@ test_expect_success 'B: accept branch name \"TEMP_TAG\"' '\n \ttest `git rev-parse master` = `git rev-parse TEMP_TAG^`\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/empty-committer-1\n-committer  <> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-empty commit\n-COMMIT\n-INPUT_END\n test_expect_success 'B: accept empty committer' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/empty-committer-1\n+\tcommitter  <> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tempty commit\n+\tCOMMIT\n+\tINPUT_END\n+\n \ttest_when_finished \"git update-ref -d refs/heads/empty-committer-1\n \t\tgit gc\n \t\tgit prune\" &&\n@@ -384,14 +385,15 @@ test_expect_success 'B: accept empty committer' '\n \ttest -z \"$out\"\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/empty-committer-2\n-committer <a@b.com> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-empty commit\n-COMMIT\n-INPUT_END\n test_expect_success 'B: accept and fixup committer with no name' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/empty-committer-2\n+\tcommitter <a@b.com> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tempty commit\n+\tCOMMIT\n+\tINPUT_END\n+\n \ttest_when_finished \"git update-ref -d refs/heads/empty-committer-2\n \t\tgit gc\n \t\tgit prune\" &&\n@@ -401,62 +403,67 @@ test_expect_success 'B: accept and fixup committer with no name' '\n \ttest -z \"$out\"\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/invalid-committer\n-committer Name email> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-empty commit\n-COMMIT\n-INPUT_END\n test_expect_success 'B: fail on invalid committer (1)' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/invalid-committer\n+\tcommitter Name email> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tempty commit\n+\tCOMMIT\n+\tINPUT_END\n+\n \ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/invalid-committer\n-committer Name <e<mail> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-empty commit\n-COMMIT\n-INPUT_END\n test_expect_success 'B: fail on invalid committer (2)' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/invalid-committer\n+\tcommitter Name <e<mail> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tempty commit\n+\tCOMMIT\n+\tINPUT_END\n+\n \ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/invalid-committer\n-committer Name <email>> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-empty commit\n-COMMIT\n-INPUT_END\n test_expect_success 'B: fail on invalid committer (3)' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/invalid-committer\n+\tcommitter Name <email>> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tempty commit\n+\tCOMMIT\n+\tINPUT_END\n+\n \ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/invalid-committer\n-committer Name <email $GIT_COMMITTER_DATE\n-data <<COMMIT\n-empty commit\n-COMMIT\n-INPUT_END\n test_expect_success 'B: fail on invalid committer (4)' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/invalid-committer\n+\tcommitter Name <email $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tempty commit\n+\tCOMMIT\n+\tINPUT_END\n+\n \ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/invalid-committer\n-committer Name<email> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-empty commit\n-COMMIT\n-INPUT_END\n test_expect_success 'B: fail on invalid committer (5)' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/invalid-committer\n+\tcommitter Name<email> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tempty commit\n+\tCOMMIT\n+\tINPUT_END\n+\n \ttest_when_finished \"git update-ref -d refs/heads/invalid-committer\" &&\n \ttest_must_fail git fast-import <input\n '\n@@ -465,23 +472,24 @@ test_expect_success 'B: fail on invalid committer (5)' '\n ### series C\n ###\n \n-newf=`echo hi newf | git hash-object -w --stdin`\n-oldf=`git rev-parse --verify master:file2`\n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/branch\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-second\n-COMMIT\n-\n-from refs/heads/master\n-M 644 $oldf file2/oldf\n-M 755 $newf file2/newf\n-D file3\n-\n-INPUT_END\n test_expect_success 'C: incremental import create pack from stdin' '\n+\tnewf=`echo hi newf | git hash-object -w --stdin` &&\n+\toldf=`git rev-parse --verify master:file2` &&\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/branch\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tsecond\n+\tCOMMIT\n+\n+\tfrom refs/heads/master\n+\tM 644 $oldf file2/oldf\n+\tM 755 $newf file2/newf\n+\tD file3\n+\n+\tINPUT_END\n+\n \tgit fast-import <input &&\n \tgit whatchanged branch\n '\n@@ -495,25 +503,26 @@ test_expect_success 'C: validate reuse existing blob' '\n \ttest $oldf = `git rev-parse --verify branch:file2/oldf`\n '\n \n-cat >expect <<-EOF &&\n-parent `git rev-parse --verify master^0`\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-\n-second\n-EOF\n test_expect_success 'C: verify commit' '\n+\tcat >expect <<-EOF &&\n+\tparent `git rev-parse --verify master^0`\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\n+\tsecond\n+\tEOF\n+\n \tgit cat-file commit branch | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-:000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A\tfile2/newf\n-:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 R100\tfile2\tfile2/oldf\n-:100644 000000 0d92e9f3374ae2947c23aa477cbc68ce598135f1 0000000000000000000000000000000000000000 D\tfile3\n-EOF\n-git diff-tree -M -r master branch >actual\n test_expect_success 'C: validate rename result' '\n+\tcat >expect <<-EOF &&\n+\t:000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A\tfile2/newf\n+\t:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 R100\tfile2\tfile2/oldf\n+\t:100644 000000 0d92e9f3374ae2947c23aa477cbc68ce598135f1 0000000000000000000000000000000000000000 D\tfile3\n+\tEOF\n+\tgit diff-tree -M -r master branch >actual &&\n \tcompare_diff_raw expect actual\n '\n \n@@ -521,27 +530,28 @@ test_expect_success 'C: validate rename result' '\n ### series D\n ###\n \n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/branch\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-third\n-COMMIT\n-\n-from refs/heads/branch^0\n-M 644 inline newdir/interesting\n-data <<EOF\n-$file5_data\n-EOF\n-\n-M 755 inline newdir/exec.sh\n-data <<EOF\n-$file6_data\n-EOF\n-\n-INPUT_END\n test_expect_success 'D: inline data in commit' '\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/branch\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tthird\n+\tCOMMIT\n+\n+\tfrom refs/heads/branch^0\n+\tM 644 inline newdir/interesting\n+\tdata <<EOF\n+\t$file5_data\n+\tEOF\n+\n+\tM 755 inline newdir/exec.sh\n+\tdata <<EOF\n+\t$file6_data\n+\tEOF\n+\n+\tINPUT_END\n+\n \tgit fast-import <input &&\n \tgit whatchanged branch\n '\n@@ -550,23 +560,23 @@ test_expect_success 'D: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<-EOF &&\n-:000000 100755 0000000000000000000000000000000000000000 e74b7d465e52746be2b4bae983670711e6e66657 A\tnewdir/exec.sh\n-:000000 100644 0000000000000000000000000000000000000000 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 A\tnewdir/interesting\n-EOF\n-git diff-tree -M -r branch^ branch >actual\n test_expect_success 'D: validate new files added' '\n+\tcat >expect <<-EOF &&\n+\t:000000 100755 0000000000000000000000000000000000000000 e74b7d465e52746be2b4bae983670711e6e66657 A\tnewdir/exec.sh\n+\t:000000 100644 0000000000000000000000000000000000000000 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 A\tnewdir/interesting\n+\tEOF\n+\tgit diff-tree -M -r branch^ branch >actual &&\n \tcompare_diff_raw expect actual\n '\n \n-echo \"$file5_data\" >expect\n test_expect_success 'D: verify file5' '\n+\techo \"$file5_data\" >expect &&\n \tgit cat-file blob branch:newdir/interesting >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$file6_data\" >expect\n test_expect_success 'D: verify file6' '\n+\techo \"$file6_data\" >expect &&\n \tgit cat-file blob branch:newdir/exec.sh >actual &&\n \ttest_cmp expect actual\n '\n@@ -575,18 +585,19 @@ test_expect_success 'D: verify file6' '\n ### series E\n ###\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/branch\n-author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> Tue Feb 6 11:22:18 2007 -0500\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> Tue Feb 6 12:35:02 2007 -0500\n-data <<COMMIT\n-RFC 2822 type date\n-COMMIT\n+test_expect_success 'E: rfc2822 date, --date-format=raw' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/branch\n+\tauthor $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> Tue Feb 6 11:22:18 2007 -0500\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> Tue Feb 6 12:35:02 2007 -0500\n+\tdata <<COMMIT\n+\tRFC 2822 type date\n+\tCOMMIT\n+\n+\tfrom refs/heads/branch^0\n \n-from refs/heads/branch^0\n+\tINPUT_END\n \n-INPUT_END\n-test_expect_success 'E: rfc2822 date, --date-format=raw' '\n \ttest_must_fail git fast-import --date-format=raw <input\n '\n test_expect_success 'E: rfc2822 date, --date-format=rfc2822' '\n@@ -597,13 +608,13 @@ test_expect_success 'E: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<-EOF &&\n-author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 1170778938 -0500\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1170783302 -0500\n-\n-RFC 2822 type date\n-EOF\n test_expect_success 'E: verify commit' '\n+\tcat >expect <<-EOF &&\n+\tauthor $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 1170778938 -0500\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1170783302 -0500\n+\n+\tRFC 2822 type date\n+\tEOF\n \tgit cat-file commit branch | sed 1,2d >actual &&\n \ttest_cmp expect actual\n '\n@@ -612,22 +623,23 @@ test_expect_success 'E: verify commit' '\n ### series F\n ###\n \n-old_branch=`git rev-parse --verify branch^0`\n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/branch\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-losing things already?\n-COMMIT\n+test_expect_success 'F: non-fast-forward update skips' '\n+\told_branch=`git rev-parse --verify branch^0` &&\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/branch\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tlosing things already?\n+\tCOMMIT\n \n-from refs/heads/branch~1\n+\tfrom refs/heads/branch~1\n \n-reset refs/heads/other\n-from refs/heads/branch\n+\treset refs/heads/other\n+\tfrom refs/heads/branch\n+\n+\tINPUT_END\n \n-INPUT_END\n-test_expect_success 'F: non-fast-forward update skips' '\n \ttest_must_fail git fast-import <input &&\n \t# branch must remain unaffected\n \ttest $old_branch = `git rev-parse --verify branch^0`\n@@ -637,15 +649,15 @@ test_expect_success 'F: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<-EOF &&\n-tree `git rev-parse branch~1^{tree}`\n-parent `git rev-parse branch~1`\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-\n-losing things already?\n-EOF\n test_expect_success 'F: verify other commit' '\n+\tcat >expect <<-EOF &&\n+\ttree `git rev-parse branch~1^{tree}`\n+\tparent `git rev-parse branch~1`\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\n+\tlosing things already?\n+\tEOF\n \tgit cat-file commit other >actual &&\n \ttest_cmp expect actual\n '\n@@ -654,19 +666,19 @@ test_expect_success 'F: verify other commit' '\n ### series G\n ###\n \n-old_branch=`git rev-parse --verify branch^0`\n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/branch\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-losing things already?\n-COMMIT\n+test_expect_success 'G: non-fast-forward update forced' '\n+\told_branch=`git rev-parse --verify branch^0` &&\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/branch\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tlosing things already?\n+\tCOMMIT\n \n-from refs/heads/branch~1\n+\tfrom refs/heads/branch~1\n \n-INPUT_END\n-test_expect_success 'G: non-fast-forward update forced' '\n+\tINPUT_END\n \tgit fast-import --force <input\n '\n \n@@ -683,28 +695,28 @@ test_expect_success 'G: branch changed, but logged' '\n ### series H\n ###\n \n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/H\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-third\n-COMMIT\n-\n-from refs/heads/branch^0\n-M 644 inline i-will-die\n-data <<EOF\n-this file will never exist.\n-EOF\n-\n-deleteall\n-M 644 inline h/e/l/lo\n-data <<EOF\n-$file5_data\n-EOF\n-\n-INPUT_END\n test_expect_success 'H: deletall, add 1' '\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/H\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tthird\n+\tCOMMIT\n+\n+\tfrom refs/heads/branch^0\n+\tM 644 inline i-will-die\n+\tdata <<EOF\n+\tthis file will never exist.\n+\tEOF\n+\n+\tdeleteall\n+\tM 644 inline h/e/l/lo\n+\tdata <<EOF\n+\t$file5_data\n+\tEOF\n+\n+\tINPUT_END\n \tgit fast-import <input &&\n \tgit whatchanged H\n '\n@@ -713,20 +725,20 @@ test_expect_success 'H: verify pack' '\n \tverify_packs\n '\n \n-cat >expect <<-EOF &&\n-:100755 000000 f1fb5da718392694d0076d677d6d0e364c79b0bc 0000000000000000000000000000000000000000 D\tfile2/newf\n-:100644 000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 0000000000000000000000000000000000000000 D\tfile2/oldf\n-:100755 000000 85df50785d62d3b05ab03d9cbf7e4a0b49449730 0000000000000000000000000000000000000000 D\tfile4\n-:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 R100\tnewdir/interesting\th/e/l/lo\n-:100755 000000 e74b7d465e52746be2b4bae983670711e6e66657 0000000000000000000000000000000000000000 D\tnewdir/exec.sh\n-EOF\n-git diff-tree -M -r H^ H >actual\n test_expect_success 'H: validate old files removed, new files added' '\n+\tcat >expect <<-EOF &&\n+\t:100755 000000 f1fb5da718392694d0076d677d6d0e364c79b0bc 0000000000000000000000000000000000000000 D\tfile2/newf\n+\t:100644 000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 0000000000000000000000000000000000000000 D\tfile2/oldf\n+\t:100755 000000 85df50785d62d3b05ab03d9cbf7e4a0b49449730 0000000000000000000000000000000000000000 D\tfile4\n+\t:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 R100\tnewdir/interesting\th/e/l/lo\n+\t:100755 000000 e74b7d465e52746be2b4bae983670711e6e66657 0000000000000000000000000000000000000000 D\tnewdir/exec.sh\n+\tEOF\n+\tgit diff-tree -M -r H^ H >actual &&\n \tcompare_diff_raw expect actual\n '\n \n-echo \"$file5_data\" >expect\n test_expect_success 'H: verify file' '\n+\techo \"$file5_data\" >expect &&\n \tgit cat-file blob H:h/e/l/lo >actual &&\n \ttest_cmp expect actual\n '\n@@ -735,24 +747,24 @@ test_expect_success 'H: verify file' '\n ### series I\n ###\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/export-boundary\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-we have a border.  its only 40 characters wide.\n-COMMIT\n+test_expect_success 'I: export-pack-edges' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/export-boundary\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\twe have a border.  its only 40 characters wide.\n+\tCOMMIT\n \n-from refs/heads/branch\n+\tfrom refs/heads/branch\n \n-INPUT_END\n-test_expect_success 'I: export-pack-edges' '\n+\tINPUT_END\n \tgit fast-import --export-pack-edges=edges.list <input\n '\n \n-cat >expect <<-EOF &&\n-.git/objects/pack/pack-.pack: `git rev-parse --verify export-boundary`\n-EOF\n test_expect_success 'I: verify edge list' '\n+\tcat >expect <<-EOF &&\n+\t.git/objects/pack/pack-.pack: `git rev-parse --verify export-boundary`\n+\tEOF\n \tsed -e s/pack-.*pack/pack-.pack/ edges.list >actual &&\n \ttest_cmp expect actual\n '\n@@ -761,25 +773,25 @@ test_expect_success 'I: verify edge list' '\n ### series J\n ###\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/J\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-create J\n-COMMIT\n+test_expect_success 'J: reset existing branch creates empty commit' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/J\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tcreate J\n+\tCOMMIT\n \n-from refs/heads/branch\n+\tfrom refs/heads/branch\n \n-reset refs/heads/J\n+\treset refs/heads/J\n \n-commit refs/heads/J\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-initialize J\n-COMMIT\n+\tcommit refs/heads/J\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tinitialize J\n+\tCOMMIT\n \n-INPUT_END\n-test_expect_success 'J: reset existing branch creates empty commit' '\n+\tINPUT_END\n \tgit fast-import <input\n '\n test_expect_success 'J: branch has 1 commit, empty tree' '\n@@ -787,41 +799,42 @@ test_expect_success 'J: branch has 1 commit, empty tree' '\n \ttest 0 = `git ls-tree J | wc -l`\n '\n \n-cat >input <<-INPUT_END &&\n-reset refs/heads/J2\n-\n-tag wrong_tag\n-from refs/heads/J2\n-data <<EOF\n-Tag branch that was reset.\n-EOF\n-INPUT_END\n test_expect_success 'J: tag must fail on empty branch' '\n+\tcat >input <<-INPUT_END &&\n+\treset refs/heads/J2\n+\n+\ttag wrong_tag\n+\tfrom refs/heads/J2\n+\tdata <<EOF\n+\tTag branch that was reset.\n+\tEOF\n+\tINPUT_END\n \ttest_must_fail git fast-import <input\n '\n+\n ###\n ### series K\n ###\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/K\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-create K\n-COMMIT\n+test_expect_success 'K: reinit branch with from' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/K\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tcreate K\n+\tCOMMIT\n \n-from refs/heads/branch\n+\tfrom refs/heads/branch\n \n-commit refs/heads/K\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-redo K\n-COMMIT\n+\tcommit refs/heads/K\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tredo K\n+\tCOMMIT\n \n-from refs/heads/branch^1\n+\tfrom refs/heads/branch^1\n \n-INPUT_END\n-test_expect_success 'K: reinit branch with from' '\n+\tINPUT_END\n \tgit fast-import <input\n '\n test_expect_success 'K: verify K^1 = branch^1' '\n@@ -833,84 +846,84 @@ test_expect_success 'K: verify K^1 = branch^1' '\n ### series L\n ###\n \n-cat >input <<-INPUT_END &&\n-blob\n-mark :1\n-data <<EOF\n-some data\n-EOF\n-\n-blob\n-mark :2\n-data <<EOF\n-other data\n-EOF\n-\n-commit refs/heads/L\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-create L\n-COMMIT\n-\n-M 644 :1 b.\n-M 644 :1 b/other\n-M 644 :1 ba\n-\n-commit refs/heads/L\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-update L\n-COMMIT\n-\n-M 644 :2 b.\n-M 644 :2 b/other\n-M 644 :2 ba\n-INPUT_END\n-\n-cat >expect <<-EXPECT_END &&\n-:100644 100644 4268632... 55d3a52... M\tb.\n-:040000 040000 0ae5cac... 443c768... M\tb\n-:100644 100644 4268632... 55d3a52... M\tba\n-EXPECT_END\n+test_expect_success 'L: verify internal tree sorting' '\n+\tcat >input <<-INPUT_END &&\n+\tblob\n+\tmark :1\n+\tdata <<EOF\n+\tsome data\n+\tEOF\n+\n+\tblob\n+\tmark :2\n+\tdata <<EOF\n+\tother data\n+\tEOF\n+\n+\tcommit refs/heads/L\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tcreate L\n+\tCOMMIT\n+\n+\tM 644 :1 b.\n+\tM 644 :1 b/other\n+\tM 644 :1 ba\n+\n+\tcommit refs/heads/L\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tupdate L\n+\tCOMMIT\n+\n+\tM 644 :2 b.\n+\tM 644 :2 b/other\n+\tM 644 :2 ba\n+\tINPUT_END\n+\n+\tcat >expect <<-EXPECT_END &&\n+\t:100644 100644 4268632... 55d3a52... M\tb.\n+\t:040000 040000 0ae5cac... 443c768... M\tb\n+\t:100644 100644 4268632... 55d3a52... M\tba\n+\tEXPECT_END\n+\n+\tgit fast-import <input &&\n+\tgit diff-tree --abbrev --raw L^ L >output &&\n+\ttest_cmp expect output\n+'\n+\n+test_expect_success 'L: nested tree copy does not corrupt deltas' '\n+\tcat >input <<-INPUT_END &&\n+\tblob\n+\tmark :1\n+\tdata <<EOF\n+\tthe data\n+\tEOF\n+\n+\tcommit refs/heads/L2\n+\tcommitter C O Mitter <committer@example.com> 1112912473 -0700\n+\tdata <<COMMIT\n+\tinit L2\n+\tCOMMIT\n+\tM 644 :1 a/b/c\n+\tM 644 :1 a/b/d\n+\tM 644 :1 a/e/f\n \n-test_expect_success 'L: verify internal tree sorting' '\n-\tgit fast-import <input &&\n-\tgit diff-tree --abbrev --raw L^ L >output &&\n-\ttest_cmp expect output\n-'\n+\tcommit refs/heads/L2\n+\tcommitter C O Mitter <committer@example.com> 1112912473 -0700\n+\tdata <<COMMIT\n+\tupdate L2\n+\tCOMMIT\n+\tC a g\n+\tC a/e g/b\n+\tM 644 :1 g/b/h\n+\tINPUT_END\n \n-cat >input <<-INPUT_END &&\n-blob\n-mark :1\n-data <<EOF\n-the data\n-EOF\n-\n-commit refs/heads/L2\n-committer C O Mitter <committer@example.com> 1112912473 -0700\n-data <<COMMIT\n-init L2\n-COMMIT\n-M 644 :1 a/b/c\n-M 644 :1 a/b/d\n-M 644 :1 a/e/f\n-\n-commit refs/heads/L2\n-committer C O Mitter <committer@example.com> 1112912473 -0700\n-data <<COMMIT\n-update L2\n-COMMIT\n-C a g\n-C a/e g/b\n-M 644 :1 g/b/h\n-INPUT_END\n-\n-cat <<-EOF >expect &&\n-g/b/f\n-g/b/h\n-EOF\n+\tcat >expect <<-\\EOF &&\n+\tg/b/f\n+\tg/b/h\n+\tEOF\n \n-test_expect_success 'L: nested tree copy does not corrupt deltas' '\n \ttest_when_finished \"git update-ref -d refs/heads/L2\" &&\n \tgit fast-import <input &&\n \tgit ls-tree L2 g/b/ >tmp &&\n@@ -923,90 +936,90 @@ test_expect_success 'L: nested tree copy does not corrupt deltas' '\n ### series M\n ###\n \n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/M1\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-file rename\n-COMMIT\n+test_expect_success 'M: rename file in same subdirectory' '\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/M1\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tfile rename\n+\tCOMMIT\n \n-from refs/heads/branch^0\n-R file2/newf file2/n.e.w.f\n+\tfrom refs/heads/branch^0\n+\tR file2/newf file2/n.e.w.f\n \n-INPUT_END\n+\tINPUT_END\n \n-cat >expect <<-EOF &&\n-:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\tfile2/newf\tfile2/n.e.w.f\n-EOF\n-test_expect_success 'M: rename file in same subdirectory' '\n+\tcat >expect <<-EOF &&\n+\t:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\tfile2/newf\tfile2/n.e.w.f\n+\tEOF\n \tgit fast-import <input &&\n \tgit diff-tree -M -r M1^ M1 >actual &&\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/M2\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-file rename\n-COMMIT\n+test_expect_success 'M: rename file to new subdirectory' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/M2\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tfile rename\n+\tCOMMIT\n \n-from refs/heads/branch^0\n-R file2/newf i/am/new/to/you\n+\tfrom refs/heads/branch^0\n+\tR file2/newf i/am/new/to/you\n \n-INPUT_END\n+\tINPUT_END\n \n-cat >expect <<-EOF &&\n-:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\tfile2/newf\ti/am/new/to/you\n-EOF\n-test_expect_success 'M: rename file to new subdirectory' '\n+\tcat >expect <<-EOF &&\n+\t:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\tfile2/newf\ti/am/new/to/you\n+\tEOF\n \tgit fast-import <input &&\n \tgit diff-tree -M -r M2^ M2 >actual &&\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/M3\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-file rename\n-COMMIT\n+test_expect_success 'M: rename subdirectory to new subdirectory' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/M3\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tfile rename\n+\tCOMMIT\n \n-from refs/heads/M2^0\n-R i other/sub\n+\tfrom refs/heads/M2^0\n+\tR i other/sub\n \n-INPUT_END\n+\tINPUT_END\n \n-cat >expect <<-EOF &&\n-:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\ti/am/new/to/you\tother/sub/am/new/to/you\n-EOF\n-test_expect_success 'M: rename subdirectory to new subdirectory' '\n+\tcat >expect <<-EOF &&\n+\t:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\ti/am/new/to/you\tother/sub/am/new/to/you\n+\tEOF\n \tgit fast-import <input &&\n \tgit diff-tree -M -r M3^ M3 >actual &&\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/M4\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-rename root\n-COMMIT\n+test_expect_success 'M: rename root to subdirectory' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/M4\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\trename root\n+\tCOMMIT\n \n-from refs/heads/M2^0\n-R \"\" sub\n+\tfrom refs/heads/M2^0\n+\tR \"\" sub\n \n-INPUT_END\n+\tINPUT_END\n \n-cat >expect <<-EOF &&\n-:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 R100\tfile2/oldf\tsub/file2/oldf\n-:100755 100755 85df50785d62d3b05ab03d9cbf7e4a0b49449730 85df50785d62d3b05ab03d9cbf7e4a0b49449730 R100\tfile4\tsub/file4\n-:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\ti/am/new/to/you\tsub/i/am/new/to/you\n-:100755 100755 e74b7d465e52746be2b4bae983670711e6e66657 e74b7d465e52746be2b4bae983670711e6e66657 R100\tnewdir/exec.sh\tsub/newdir/exec.sh\n-:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 R100\tnewdir/interesting\tsub/newdir/interesting\n-EOF\n-test_expect_success 'M: rename root to subdirectory' '\n+\tcat >expect <<-EOF &&\n+\t:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 R100\tfile2/oldf\tsub/file2/oldf\n+\t:100755 100755 85df50785d62d3b05ab03d9cbf7e4a0b49449730 85df50785d62d3b05ab03d9cbf7e4a0b49449730 R100\tfile4\tsub/file4\n+\t:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc R100\ti/am/new/to/you\tsub/i/am/new/to/you\n+\t:100755 100755 e74b7d465e52746be2b4bae983670711e6e66657 e74b7d465e52746be2b4bae983670711e6e66657 R100\tnewdir/exec.sh\tsub/newdir/exec.sh\n+\t:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 R100\tnewdir/interesting\tsub/newdir/interesting\n+\tEOF\n \tgit fast-import <input &&\n \tgit diff-tree -M -r M4^ M4 >actual &&\n \tcat actual &&\n@@ -1017,81 +1030,81 @@ test_expect_success 'M: rename root to subdirectory' '\n ### series N\n ###\n \n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/N1\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-file copy\n-COMMIT\n+test_expect_success 'N: copy file in same subdirectory' '\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/N1\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tfile copy\n+\tCOMMIT\n \n-from refs/heads/branch^0\n-C file2/newf file2/n.e.w.f\n+\tfrom refs/heads/branch^0\n+\tC file2/newf file2/n.e.w.f\n \n-INPUT_END\n+\tINPUT_END\n \n-cat >expect <<-EOF &&\n-:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile2/n.e.w.f\n-EOF\n-test_expect_success 'N: copy file in same subdirectory' '\n+\tcat >expect <<-EOF &&\n+\t:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile2/n.e.w.f\n+\tEOF\n \tgit fast-import <input &&\n \tgit diff-tree -C --find-copies-harder -r N1^ N1 >actual &&\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/N2\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-clean directory copy\n-COMMIT\n+test_expect_success 'N: copy then modify subdirectory' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/N2\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tclean directory copy\n+\tCOMMIT\n \n-from refs/heads/branch^0\n-C file2 file3\n+\tfrom refs/heads/branch^0\n+\tC file2 file3\n \n-commit refs/heads/N2\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-modify directory copy\n-COMMIT\n+\tcommit refs/heads/N2\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tmodify directory copy\n+\tCOMMIT\n \n-M 644 inline file3/file5\n-data <<EOF\n-$file5_data\n-EOF\n+\tM 644 inline file3/file5\n+\tdata <<EOF\n+\t$file5_data\n+\tEOF\n \n-INPUT_END\n+\tINPUT_END\n \n-cat >expect <<-EOF &&\n-:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100\tnewdir/interesting\tfile3/file5\n-:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile3/newf\n-:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100\tfile2/oldf\tfile3/oldf\n-EOF\n-test_expect_success 'N: copy then modify subdirectory' '\n+\tcat >expect <<-EOF &&\n+\t:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100\tnewdir/interesting\tfile3/file5\n+\t:100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100\tfile2/newf\tfile3/newf\n+\t:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100\tfile2/oldf\tfile3/oldf\n+\tEOF\n \tgit fast-import <input &&\n \tgit diff-tree -C --find-copies-harder -r N2^^ N2 >actual &&\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/N3\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-dirty directory copy\n-COMMIT\n+test_expect_success 'N: copy dirty subdirectory' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/N3\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tdirty directory copy\n+\tCOMMIT\n \n-from refs/heads/branch^0\n-M 644 inline file2/file5\n-data <<EOF\n-$file5_data\n-EOF\n+\tfrom refs/heads/branch^0\n+\tM 644 inline file2/file5\n+\tdata <<EOF\n+\t$file5_data\n+\tEOF\n \n-C file2 file3\n-D file2/file5\n+\tC file2 file3\n+\tD file2/file5\n \n-INPUT_END\n+\tINPUT_END\n \n-test_expect_success 'N: copy dirty subdirectory' '\n \tgit fast-import <input &&\n \ttest `git rev-parse N2^{tree}` = `git rev-parse N3^{tree}`\n '\n@@ -1457,59 +1470,59 @@ test_expect_success 'N: modify subtree, extract it, and modify again' '\n ### series O\n ###\n \n-cat >input <<-INPUT_END &&\n-#we will\n-commit refs/heads/O1\n-# -- ignore all of this text\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-# $GIT_COMMITTER_NAME has inserted here for his benefit.\n-data <<COMMIT\n-dirty directory copy\n-COMMIT\n-\n-# don't forget the import blank line!\n-#\n-# yes, we started from our usual base of branch^0.\n-# i like branch^0.\n-from refs/heads/branch^0\n-# and we need to reuse file2/file5 from N3 above.\n-M 644 inline file2/file5\n-# otherwise the tree will be different\n-data <<EOF\n-$file5_data\n-EOF\n-\n-# don't forget to copy file2 to file3\n-C file2 file3\n-#\n-# or to delete file5 from file2.\n-D file2/file5\n-# are we done yet?\n+test_expect_success 'O: comments are all skipped' '\n+\tcat >input <<-INPUT_END &&\n+\t#we will\n+\tcommit refs/heads/O1\n+\t# -- ignore all of this text\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\t# $GIT_COMMITTER_NAME has inserted here for his benefit.\n+\tdata <<COMMIT\n+\tdirty directory copy\n+\tCOMMIT\n+\n+\t# do not forget the import blank line!\n+\t#\n+\t# yes, we started from our usual base of branch^0.\n+\t# i like branch^0.\n+\tfrom refs/heads/branch^0\n+\t# and we need to reuse file2/file5 from N3 above.\n+\tM 644 inline file2/file5\n+\t# otherwise the tree will be different\n+\tdata <<EOF\n+\t$file5_data\n+\tEOF\n \n-INPUT_END\n+\t# do not forget to copy file2 to file3\n+\tC file2 file3\n+\t#\n+\t# or to delete file5 from file2.\n+\tD file2/file5\n+\t# are we done yet?\n+\n+\tINPUT_END\n \n-test_expect_success 'O: comments are all skipped' '\n \tgit fast-import <input &&\n \ttest `git rev-parse N3` = `git rev-parse O1`\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/O2\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-dirty directory copy\n-COMMIT\n-from refs/heads/branch^0\n-M 644 inline file2/file5\n-data <<EOF\n-$file5_data\n-EOF\n-C file2 file3\n-D file2/file5\n+test_expect_success 'O: blank lines not necessary after data commands' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/O2\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tdirty directory copy\n+\tCOMMIT\n+\tfrom refs/heads/branch^0\n+\tM 644 inline file2/file5\n+\tdata <<EOF\n+\t$file5_data\n+\tEOF\n+\tC file2 file3\n+\tD file2/file5\n \n-INPUT_END\n+\tINPUT_END\n \n-test_expect_success 'O: blank lines not necessary after data commands' '\n \tgit fast-import <input &&\n \ttest `git rev-parse N3` = `git rev-parse O2`\n '\n@@ -1518,43 +1531,44 @@ test_expect_success 'O: repack before next test' '\n \tgit repack -a -d\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/O3\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-zstring\n-COMMIT\n-commit refs/heads/O3\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-zof\n-COMMIT\n-checkpoint\n-commit refs/heads/O3\n-mark :5\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-zempty\n-COMMIT\n-checkpoint\n-commit refs/heads/O3\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-zcommits\n-COMMIT\n-reset refs/tags/O3-2nd\n-from :5\n-reset refs/tags/O3-3rd\n-from :5\n-INPUT_END\n-\n-cat >expect <<-INPUT_END &&\n-string\n-of\n-empty\n-commits\n-INPUT_END\n test_expect_success 'O: blank lines not necessary after other commands' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/O3\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tzstring\n+\tCOMMIT\n+\tcommit refs/heads/O3\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tzof\n+\tCOMMIT\n+\tcheckpoint\n+\tcommit refs/heads/O3\n+\tmark :5\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tzempty\n+\tCOMMIT\n+\tcheckpoint\n+\tcommit refs/heads/O3\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tzcommits\n+\tCOMMIT\n+\treset refs/tags/O3-2nd\n+\tfrom :5\n+\treset refs/tags/O3-3rd\n+\tfrom :5\n+\tINPUT_END\n+\n+\tcat >expect <<-INPUT_END &&\n+\tstring\n+\tof\n+\tempty\n+\tcommits\n+\tINPUT_END\n+\n \tgit fast-import <input &&\n \ttest 8 = `find .git/objects/pack -type f | wc -l` &&\n \ttest `git rev-parse refs/tags/O3-2nd` = `git rev-parse O3^` &&\n@@ -1562,319 +1576,319 @@ test_expect_success 'O: blank lines not necessary after other commands' '\n \ttest_cmp expect actual\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/O4\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-zstring\n-COMMIT\n-commit refs/heads/O4\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-zof\n-COMMIT\n-progress Two commits down, 2 to go!\n-commit refs/heads/O4\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-zempty\n-COMMIT\n-progress Three commits down, 1 to go!\n-commit refs/heads/O4\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-zcommits\n-COMMIT\n-progress I'm done!\n-INPUT_END\n test_expect_success 'O: progress outputs as requested by input' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/O4\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tzstring\n+\tCOMMIT\n+\tcommit refs/heads/O4\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tzof\n+\tCOMMIT\n+\tprogress Two commits down, 2 to go!\n+\tcommit refs/heads/O4\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tzempty\n+\tCOMMIT\n+\tprogress Three commits down, 1 to go!\n+\tcommit refs/heads/O4\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tzcommits\n+\tCOMMIT\n+\tprogress done!\n+\tINPUT_END\n \tgit fast-import <input >actual &&\n \tgrep \"progress \" <input >expect &&\n \ttest_cmp expect actual\n '\n \n-###\n-### series P (gitlinks)\n-###\n+###\n+### series P (gitlinks)\n+###\n+\n+test_expect_success 'P: superproject & submodule mix' '\n+\tcat >input <<-INPUT_END &&\n+\tblob\n+\tmark :1\n+\tdata 10\n+\ttest file\n+\n+\treset refs/heads/sub\n+\tcommit refs/heads/sub\n+\tmark :2\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata 12\n+\tsub_initial\n+\tM 100644 :1 file\n+\n+\tblob\n+\tmark :3\n+\tdata <<DATAEND\n+\t[submodule \"sub\"]\n+\t\tpath = sub\n+\t\turl = \"`pwd`/sub\"\n+\tDATAEND\n+\n+\tcommit refs/heads/subuse1\n+\tmark :4\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata 8\n+\tinitial\n+\tfrom refs/heads/master\n+\tM 100644 :3 .gitmodules\n+\tM 160000 :2 sub\n+\n+\tblob\n+\tmark :5\n+\tdata 20\n+\ttest file\n+\tmore data\n+\n+\tcommit refs/heads/sub\n+\tmark :6\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata 11\n+\tsub_second\n+\tfrom :2\n+\tM 100644 :5 file\n+\n+\tcommit refs/heads/subuse1\n+\tmark :7\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata 7\n+\tsecond\n+\tfrom :4\n+\tM 160000 :6 sub\n+\n+\tINPUT_END\n+\n+\tgit fast-import <input &&\n+\tgit checkout subuse1 &&\n+\trm -rf sub &&\n+\tmkdir sub &&\n+\t(\n+\t\tcd sub &&\n+\t\tgit init &&\n+\t\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&\n+\t\tgit checkout master\n+\t) &&\n+\tgit submodule init &&\n+\tgit submodule update\n+'\n+\n+test_expect_success 'P: verbatim SHA gitlinks' '\n+\tSUBLAST=$(git rev-parse --verify sub) &&\n+\tSUBPREV=$(git rev-parse --verify sub^) &&\n+\n+\tcat >input <<-INPUT_END &&\n+\tblob\n+\tmark :1\n+\tdata <<DATAEND\n+\t[submodule \"sub\"]\n+\t\tpath = sub\n+\t\turl = \"`pwd`/sub\"\n+\tDATAEND\n+\n+\tcommit refs/heads/subuse2\n+\tmark :2\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata 8\n+\tinitial\n+\tfrom refs/heads/master\n+\tM 100644 :1 .gitmodules\n+\tM 160000 $SUBPREV sub\n+\n+\tcommit refs/heads/subuse2\n+\tmark :3\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata 7\n+\tsecond\n+\tfrom :2\n+\tM 160000 $SUBLAST sub\n+\n+\tINPUT_END\n+\n+\tgit branch -D sub &&\n+\tgit gc &&\n+\tgit prune &&\n+\tgit fast-import <input &&\n+\ttest $(git rev-parse --verify subuse2) = $(git rev-parse --verify subuse1)\n+'\n+\n+test_expect_success 'P: fail on inline gitlink' '\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/subuse3\n+\tmark :1\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tcorrupt\n+\tCOMMIT\n+\n+\tfrom refs/heads/subuse2\n+\tM 160000 inline sub\n+\tdata <<DATA\n+\t$SUBPREV\n+\tDATA\n+\n+\tINPUT_END\n+\n+\ttest_must_fail git fast-import <input\n+'\n+\n+test_expect_success 'P: fail on blob mark in gitlink' '\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tblob\n+\tmark :1\n+\tdata <<DATA\n+\t$SUBPREV\n+\tDATA\n+\n+\tcommit refs/heads/subuse3\n+\tmark :2\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tcorrupt\n+\tCOMMIT\n+\n+\tfrom refs/heads/subuse2\n+\tM 160000 :1 sub\n+\n+\tINPUT_END\n+\n+\ttest_must_fail git fast-import <input\n+'\n+\n+###\n+### series Q (notes)\n+###\n+\n+test_expect_success 'Q: commit notes' '\n+\tnote1_data=\"The first note for the first commit\" &&\n+\tnote2_data=\"The first note for the second commit\" &&\n+\tnote3_data=\"The first note for the third commit\" &&\n+\tnote1b_data=\"The second note for the first commit\" &&\n+\tnote1c_data=\"The third note for the first commit\" &&\n+\tnote2b_data=\"The second note for the second commit\" &&\n+\n+\ttest_tick &&\n+\tcat >input <<-INPUT_END &&\n+\tblob\n+\tmark :2\n+\tdata <<EOF\n+\t$file2_data\n+\tEOF\n+\n+\tcommit refs/heads/notes-test\n+\tmark :3\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tfirst (:3)\n+\tCOMMIT\n+\n+\tM 644 :2 file2\n \n-cat >input <<-INPUT_END &&\n-blob\n-mark :1\n-data 10\n-test file\n-\n-reset refs/heads/sub\n-commit refs/heads/sub\n-mark :2\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data 12\n-sub_initial\n-M 100644 :1 file\n-\n-blob\n-mark :3\n-data <<DATAEND\n-[submodule \"sub\"]\n-\tpath = sub\n-\turl = \"`pwd`/sub\"\n-DATAEND\n-\n-commit refs/heads/subuse1\n-mark :4\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data 8\n-initial\n-from refs/heads/master\n-M 100644 :3 .gitmodules\n-M 160000 :2 sub\n-\n-blob\n-mark :5\n-data 20\n-test file\n-more data\n-\n-commit refs/heads/sub\n-mark :6\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data 11\n-sub_second\n-from :2\n-M 100644 :5 file\n-\n-commit refs/heads/subuse1\n-mark :7\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data 7\n-second\n-from :4\n-M 160000 :6 sub\n-\n-INPUT_END\n+\tblob\n+\tmark :4\n+\tdata $file4_len\n+\t$file4_data\n+\tcommit refs/heads/notes-test\n+\tmark :5\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tsecond (:5)\n+\tCOMMIT\n \n-test_expect_success 'P: superproject & submodule mix' '\n-\tgit fast-import <input &&\n-\tgit checkout subuse1 &&\n-\trm -rf sub &&\n-\tmkdir sub &&\n-\t(\n-\t\tcd sub &&\n-\t\tgit init &&\n-\t\tgit fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&\n-\t\tgit checkout master\n-\t) &&\n-\tgit submodule init &&\n-\tgit submodule update\n-'\n+\tM 644 :4 file4\n \n-SUBLAST=$(git rev-parse --verify sub)\n-SUBPREV=$(git rev-parse --verify sub^)\n-\n-cat >input <<-INPUT_END &&\n-blob\n-mark :1\n-data <<DATAEND\n-[submodule \"sub\"]\n-\tpath = sub\n-\turl = \"`pwd`/sub\"\n-DATAEND\n-\n-commit refs/heads/subuse2\n-mark :2\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data 8\n-initial\n-from refs/heads/master\n-M 100644 :1 .gitmodules\n-M 160000 $SUBPREV sub\n-\n-commit refs/heads/subuse2\n-mark :3\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data 7\n-second\n-from :2\n-M 160000 $SUBLAST sub\n-\n-INPUT_END\n+\tcommit refs/heads/notes-test\n+\tmark :6\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tthird (:6)\n+\tCOMMIT\n \n-test_expect_success 'P: verbatim SHA gitlinks' '\n-\tgit branch -D sub &&\n-\tgit gc &&\n-\tgit prune &&\n-\tgit fast-import <input &&\n-\ttest $(git rev-parse --verify subuse2) = $(git rev-parse --verify subuse1)\n-'\n+\tM 644 inline file5\n+\tdata <<EOF\n+\t$file5_data\n+\tEOF\n \n-test_tick\n-cat >input <<-INPUT_END &&\n-commit refs/heads/subuse3\n-mark :1\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-corrupt\n-COMMIT\n+\tM 755 inline file6\n+\tdata <<EOF\n+\t$file6_data\n+\tEOF\n \n-from refs/heads/subuse2\n-M 160000 inline sub\n-data <<DATA\n-$SUBPREV\n-DATA\n+\tblob\n+\tmark :7\n+\tdata <<EOF\n+\t$note1_data\n+\tEOF\n \n-INPUT_END\n+\tblob\n+\tmark :8\n+\tdata <<EOF\n+\t$note2_data\n+\tEOF\n \n-test_expect_success 'P: fail on inline gitlink' '\n-\ttest_must_fail git fast-import <input\n-'\n+\tcommit refs/notes/foobar\n+\tmark :9\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tnotes (:9)\n+\tCOMMIT\n \n-test_tick\n-cat >input <<-INPUT_END &&\n-blob\n-mark :1\n-data <<DATA\n-$SUBPREV\n-DATA\n+\tN :7 :3\n+\tN :8 :5\n+\tN inline :6\n+\tdata <<EOF\n+\t$note3_data\n+\tEOF\n \n-commit refs/heads/subuse3\n-mark :2\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-corrupt\n-COMMIT\n+\tcommit refs/notes/foobar\n+\tmark :10\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tnotes (:10)\n+\tCOMMIT\n \n-from refs/heads/subuse2\n-M 160000 :1 sub\n+\tN inline :3\n+\tdata <<EOF\n+\t$note1b_data\n+\tEOF\n \n-INPUT_END\n+\tcommit refs/notes/foobar2\n+\tmark :11\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tnotes (:11)\n+\tCOMMIT\n \n-test_expect_success 'P: fail on blob mark in gitlink' '\n-\ttest_must_fail git fast-import <input\n-'\n+\tN inline :3\n+\tdata <<EOF\n+\t$note1c_data\n+\tEOF\n \n-###\n-### series Q (notes)\n-###\n+\tcommit refs/notes/foobar\n+\tmark :12\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tnotes (:12)\n+\tCOMMIT\n+\n+\tdeleteall\n+\tN inline :5\n+\tdata <<EOF\n+\t$note2b_data\n+\tEOF\n \n-note1_data=\"The first note for the first commit\"\n-note2_data=\"The first note for the second commit\"\n-note3_data=\"The first note for the third commit\"\n-note1b_data=\"The second note for the first commit\"\n-note1c_data=\"The third note for the first commit\"\n-note2b_data=\"The second note for the second commit\"\n-\n-test_tick\n-cat >input <<-INPUT_END &&\n-blob\n-mark :2\n-data <<EOF\n-$file2_data\n-EOF\n-\n-commit refs/heads/notes-test\n-mark :3\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-first (:3)\n-COMMIT\n-\n-M 644 :2 file2\n-\n-blob\n-mark :4\n-data $file4_len\n-$file4_data\n-commit refs/heads/notes-test\n-mark :5\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-second (:5)\n-COMMIT\n-\n-M 644 :4 file4\n-\n-commit refs/heads/notes-test\n-mark :6\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-third (:6)\n-COMMIT\n-\n-M 644 inline file5\n-data <<EOF\n-$file5_data\n-EOF\n-\n-M 755 inline file6\n-data <<EOF\n-$file6_data\n-EOF\n-\n-blob\n-mark :7\n-data <<EOF\n-$note1_data\n-EOF\n-\n-blob\n-mark :8\n-data <<EOF\n-$note2_data\n-EOF\n-\n-commit refs/notes/foobar\n-mark :9\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-notes (:9)\n-COMMIT\n-\n-N :7 :3\n-N :8 :5\n-N inline :6\n-data <<EOF\n-$note3_data\n-EOF\n-\n-commit refs/notes/foobar\n-mark :10\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-notes (:10)\n-COMMIT\n-\n-N inline :3\n-data <<EOF\n-$note1b_data\n-EOF\n-\n-commit refs/notes/foobar2\n-mark :11\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-notes (:11)\n-COMMIT\n-\n-N inline :3\n-data <<EOF\n-$note1c_data\n-EOF\n-\n-commit refs/notes/foobar\n-mark :12\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-notes (:12)\n-COMMIT\n-\n-deleteall\n-N inline :5\n-data <<EOF\n-$note2b_data\n-EOF\n-\n-INPUT_END\n+\tINPUT_END\n \n-test_expect_success 'Q: commit notes' '\n \tgit fast-import <input &&\n \tgit whatchanged notes-test\n '\n@@ -1883,246 +1897,246 @@ test_expect_success 'Q: verify pack' '\n \tverify_packs\n '\n \n-commit1=$(git rev-parse notes-test~2)\n-commit2=$(git rev-parse notes-test^)\n-commit3=$(git rev-parse notes-test)\n+test_expect_success 'Q: verify first commit' '\n+\tcommit1=$(git rev-parse notes-test~2) &&\n+\tcommit2=$(git rev-parse notes-test^) &&\n+\tcommit3=$(git rev-parse notes-test) &&\n \n-cat >expect <<-EOF &&\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcat >expect <<-EOF &&\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n \n-first (:3)\n-EOF\n-test_expect_success 'Q: verify first commit' '\n+\tfirst (:3)\n+\tEOF\n \tgit cat-file commit notes-test~2 | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-parent $commit1\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-\n-second (:5)\n-EOF\n test_expect_success 'Q: verify second commit' '\n+\tcat >expect <<-EOF &&\n+\tparent $commit1\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\n+\tsecond (:5)\n+\tEOF\n \tgit cat-file commit notes-test^ | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-parent $commit2\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-\n-third (:6)\n-EOF\n test_expect_success 'Q: verify third commit' '\n+\tcat >expect <<-EOF &&\n+\tparent $commit2\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\n+\tthird (:6)\n+\tEOF\n \tgit cat-file commit notes-test | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-\n-notes (:9)\n-EOF\n test_expect_success 'Q: verify first notes commit' '\n+\tcat >expect <<-EOF &&\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\n+\tnotes (:9)\n+\tEOF\n \tgit cat-file commit refs/notes/foobar~2 | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect.unsorted <<-EOF &&\n-100644 blob $commit1\n-100644 blob $commit2\n-100644 blob $commit3\n-EOF\n-cat expect.unsorted | sort >expect\n test_expect_success 'Q: verify first notes tree' '\n+\tcat >expect.unsorted <<-EOF &&\n+\t100644 blob $commit1\n+\t100644 blob $commit2\n+\t100644 blob $commit3\n+\tEOF\n+\tcat expect.unsorted | sort >expect &&\n \tgit cat-file -p refs/notes/foobar~2^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$note1_data\" >expect\n test_expect_success 'Q: verify first note for first commit' '\n+\techo \"$note1_data\" >expect &&\n \tgit cat-file blob refs/notes/foobar~2:$commit1 >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$note2_data\" >expect\n test_expect_success 'Q: verify first note for second commit' '\n+\techo \"$note2_data\" >expect &&\n \tgit cat-file blob refs/notes/foobar~2:$commit2 >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$note3_data\" >expect\n test_expect_success 'Q: verify first note for third commit' '\n+\techo \"$note3_data\" >expect &&\n \tgit cat-file blob refs/notes/foobar~2:$commit3 >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-parent `git rev-parse --verify refs/notes/foobar~2`\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-\n-notes (:10)\n-EOF\n test_expect_success 'Q: verify second notes commit' '\n+\tcat >expect <<-EOF &&\n+\tparent `git rev-parse --verify refs/notes/foobar~2`\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\n+\tnotes (:10)\n+\tEOF\n \tgit cat-file commit refs/notes/foobar^ | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect.unsorted <<-EOF &&\n-100644 blob $commit1\n-100644 blob $commit2\n-100644 blob $commit3\n-EOF\n-cat expect.unsorted | sort >expect\n test_expect_success 'Q: verify second notes tree' '\n+\tcat >expect.unsorted <<-EOF &&\n+\t100644 blob $commit1\n+\t100644 blob $commit2\n+\t100644 blob $commit3\n+\tEOF\n+\tcat expect.unsorted | sort >expect &&\n \tgit cat-file -p refs/notes/foobar^^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$note1b_data\" >expect\n test_expect_success 'Q: verify second note for first commit' '\n+\techo \"$note1b_data\" >expect &&\n \tgit cat-file blob refs/notes/foobar^:$commit1 >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$note2_data\" >expect\n test_expect_success 'Q: verify first note for second commit' '\n+\techo \"$note2_data\" >expect &&\n \tgit cat-file blob refs/notes/foobar^:$commit2 >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$note3_data\" >expect\n test_expect_success 'Q: verify first note for third commit' '\n+\techo \"$note3_data\" >expect &&\n \tgit cat-file blob refs/notes/foobar^:$commit3 >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-\n-notes (:11)\n-EOF\n test_expect_success 'Q: verify third notes commit' '\n+\tcat >expect <<-EOF &&\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\n+\tnotes (:11)\n+\tEOF\n \tgit cat-file commit refs/notes/foobar2 | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect.unsorted <<-EOF &&\n-100644 blob $commit1\n-EOF\n-cat expect.unsorted | sort >expect\n test_expect_success 'Q: verify third notes tree' '\n+\tcat >expect.unsorted <<-EOF &&\n+\t100644 blob $commit1\n+\tEOF\n+\tcat expect.unsorted | sort >expect &&\n \tgit cat-file -p refs/notes/foobar2^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$note1c_data\" >expect\n test_expect_success 'Q: verify third note for first commit' '\n+\techo \"$note1c_data\" >expect &&\n \tgit cat-file blob refs/notes/foobar2:$commit1 >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect <<-EOF &&\n-parent `git rev-parse --verify refs/notes/foobar^`\n-author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-\n-notes (:12)\n-EOF\n test_expect_success 'Q: verify fourth notes commit' '\n+\tcat >expect <<-EOF &&\n+\tparent `git rev-parse --verify refs/notes/foobar^`\n+\tauthor $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\n+\tnotes (:12)\n+\tEOF\n \tgit cat-file commit refs/notes/foobar | sed 1d >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >expect.unsorted <<-EOF &&\n-100644 blob $commit2\n-EOF\n-cat expect.unsorted | sort >expect\n test_expect_success 'Q: verify fourth notes tree' '\n+\tcat >expect.unsorted <<-EOF &&\n+\t100644 blob $commit2\n+\tEOF\n+\tcat expect.unsorted | sort >expect &&\n \tgit cat-file -p refs/notes/foobar^{tree} | sed \"s/ [0-9a-f]*\t/ /\" >actual &&\n \ttest_cmp expect actual\n '\n \n-echo \"$note2b_data\" >expect\n test_expect_success 'Q: verify second note for second commit' '\n+\techo \"$note2b_data\" >expect &&\n \tgit cat-file blob refs/notes/foobar:$commit2 >actual &&\n \ttest_cmp expect actual\n '\n \n-cat >input <<-EOF &&\n-reset refs/heads/Q0\n+test_expect_success 'Q: deny note on empty branch' '\n+\tcat >input <<-EOF &&\n+\treset refs/heads/Q0\n \n-commit refs/heads/note-Q0\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-Note for an empty branch.\n-COMMIT\n+\tcommit refs/heads/note-Q0\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tNote for an empty branch.\n+\tCOMMIT\n \n-N inline refs/heads/Q0\n-data <<NOTE\n-some note\n-NOTE\n-EOF\n-test_expect_success 'Q: deny note on empty branch' '\n+\tN inline refs/heads/Q0\n+\tdata <<NOTE\n+\tsome note\n+\tNOTE\n+\tEOF\n \ttest_must_fail git fast-import <input\n '\n ###\n ### series R (feature and option)\n ###\n \n-cat >input <<-EOF &&\n-feature no-such-feature-exists\n-EOF\n-\n test_expect_success 'R: abort on unsupported feature' '\n+\tcat >input <<-EOF &&\n+\tfeature no-such-feature-exists\n+\tEOF\n+\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<-EOF &&\n-feature date-format=now\n-EOF\n-\n test_expect_success 'R: supported feature is accepted' '\n+\tcat >input <<-EOF &&\n+\tfeature date-format=now\n+\tEOF\n+\n \tgit fast-import <input\n '\n \n-cat >input <<-EOF &&\n-blob\n-data 3\n-hi\n-feature date-format=now\n-EOF\n-\n test_expect_success 'R: abort on receiving feature after data command' '\n+\tcat >input <<-EOF &&\n+\tblob\n+\tdata 3\n+\thi\n+\tfeature date-format=now\n+\tEOF\n+\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<-EOF &&\n-feature import-marks=git.marks\n-feature import-marks=git2.marks\n-EOF\n-\n test_expect_success 'R: only one import-marks feature allowed per stream' '\n+\tcat >input <<-EOF &&\n+\tfeature import-marks=git.marks\n+\tfeature import-marks=git2.marks\n+\tEOF\n+\n \ttest_must_fail git fast-import <input\n '\n \n-cat >input <<-EOF &&\n-feature export-marks=git.marks\n-blob\n-mark :1\n-data 3\n-hi\n+test_expect_success 'R: export-marks feature results in a marks file being created' '\n+\tcat >input <<-EOF &&\n+\tfeature export-marks=git.marks\n+\tblob\n+\tmark :1\n+\tdata 3\n+\thi\n \n-EOF\n+\tEOF\n \n-test_expect_success 'R: export-marks feature results in a marks file being created' '\n \tcat input | git fast-import &&\n \tgrep :1 git.marks\n '\n@@ -2234,60 +2248,60 @@ test_expect_success 'R: feature import-marks-if-exists' '\n \ttest_cmp expect io.marks\n '\n \n-cat >input <<-EOF &&\n-feature import-marks=marks.out\n-feature export-marks=marks.new\n-EOF\n-\n test_expect_success 'R: import to output marks works without any content' '\n+\tcat >input <<-EOF &&\n+\tfeature import-marks=marks.out\n+\tfeature export-marks=marks.new\n+\tEOF\n+\n \tcat input | git fast-import &&\n \ttest_cmp marks.out marks.new\n '\n \n-cat >input <<-EOF &&\n-feature import-marks=nonexistent.marks\n-feature export-marks=marks.new\n-EOF\n-\n test_expect_success 'R: import marks prefers commandline marks file over the stream' '\n+\tcat >input <<-EOF &&\n+\tfeature import-marks=nonexistent.marks\n+\tfeature export-marks=marks.new\n+\tEOF\n+\n \tcat input | git fast-import --import-marks=marks.out &&\n \ttest_cmp marks.out marks.new\n '\n \n \n-cat >input <<-EOF &&\n-feature import-marks=nonexistent.marks\n-feature export-marks=combined.marks\n-EOF\n-\n test_expect_success 'R: multiple --import-marks= should be honoured' '\n+\tcat >input <<-EOF &&\n+\tfeature import-marks=nonexistent.marks\n+\tfeature export-marks=combined.marks\n+\tEOF\n+\n \thead -n2 marks.out > one.marks &&\n \ttail -n +3 marks.out > two.marks &&\n \tgit fast-import --import-marks=one.marks --import-marks=two.marks <input &&\n \ttest_cmp marks.out combined.marks\n '\n \n-cat >input <<-EOF &&\n-feature relative-marks\n-feature import-marks=relative.in\n-feature export-marks=relative.out\n-EOF\n-\n test_expect_success 'R: feature relative-marks should be honoured' '\n+\tcat >input <<-EOF &&\n+\tfeature relative-marks\n+\tfeature import-marks=relative.in\n+\tfeature export-marks=relative.out\n+\tEOF\n+\n \tmkdir -p .git/info/fast-import/ &&\n \tcp marks.new .git/info/fast-import/relative.in &&\n \tgit fast-import <input &&\n \ttest_cmp marks.new .git/info/fast-import/relative.out\n '\n \n-cat >input <<-EOF &&\n-feature relative-marks\n-feature import-marks=relative.in\n-feature no-relative-marks\n-feature export-marks=non-relative.out\n-EOF\n-\n test_expect_success 'R: feature no-relative-marks should be honoured' '\n+\tcat >input <<-EOF &&\n+\tfeature relative-marks\n+\tfeature import-marks=relative.in\n+\tfeature no-relative-marks\n+\tfeature export-marks=non-relative.out\n+\tEOF\n+\n \tgit fast-import <input &&\n \ttest_cmp marks.new non-relative.out\n '\n@@ -2549,15 +2563,15 @@ test_expect_success PIPE 'R: print staged blob within commit' '\n \ttest_cmp expect actual\n '\n \n-cat >input <<-EOF &&\n-option git quiet\n-blob\n-data 3\n-hi\n+test_expect_success 'R: quiet option results in no stats being output' '\n+\tcat >input <<-EOF &&\n+\toption git quiet\n+\tblob\n+\tdata 3\n+\thi\n \n-EOF\n+\tEOF\n \n-test_expect_success 'R: quiet option results in no stats being output' '\n \tcat input | git fast-import 2> output &&\n \ttest_must_be_empty output\n '\n@@ -2604,11 +2618,11 @@ test_expect_success 'R: terminating \"done\" within commit' '\n \ttest_cmp expect actual\n '\n \n-cat >input <<-EOF &&\n-option git non-existing-option\n-EOF\n-\n test_expect_success 'R: die on unknown option' '\n+\tcat >input <<-EOF &&\n+\toption git non-existing-option\n+\tEOF\n+\n \ttest_must_fail git fast-import <input\n '\n \n@@ -2624,38 +2638,38 @@ test_expect_success 'R: die on invalid option argument' '\n \ttest_must_fail git fast-import --depth=\"5 elephants\" </dev/null\n '\n \n-cat >input <<-EOF &&\n-option non-existing-vcs non-existing-option\n-EOF\n-\n test_expect_success 'R: ignore non-git options' '\n+\tcat >input <<-EOF &&\n+\toption non-existing-vcs non-existing-option\n+\tEOF\n+\n \tgit fast-import <input\n '\n \n ##\n ## R: very large blobs\n ##\n-blobsize=$((2*1024*1024 + 53))\n-test-genrandom bar $blobsize >expect\n-cat >input <<-INPUT_END &&\n-commit refs/heads/big-file\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-R - big file\n-COMMIT\n-\n-M 644 inline big1\n-data $blobsize\n-INPUT_END\n-cat expect >>input\n-cat >>input <<-INPUT_END &&\n-M 644 inline big2\n-data $blobsize\n-INPUT_END\n-cat expect >>input\n-echo >>input\n-\n test_expect_success 'R: blob bigger than threshold' '\n+\tblobsize=$((2*1024*1024 + 53)) &&\n+\ttest-genrandom bar $blobsize >expect &&\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/big-file\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tR - big file\n+\tCOMMIT\n+\n+\tM 644 inline big1\n+\tdata $blobsize\n+\tINPUT_END\n+\tcat expect >>input &&\n+\tcat >>input <<-INPUT_END &&\n+\tM 644 inline big2\n+\tdata $blobsize\n+\tINPUT_END\n+\tcat expect >>input &&\n+\techo >>input &&\n+\n \ttest_create_repo R &&\n \tgit --git-dir=R/.git fast-import --big-file-threshold=1 <input\n '\n@@ -2711,46 +2725,46 @@ test_expect_success 'R: blob appears only once' '\n #\n #   Invalid dataref ..\n #\n-test_tick\n-\n-cat >input <<-INPUT_END &&\n-commit refs/heads/S\n-mark :301\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-commit 1\n-COMMIT\n-M 100644 inline hello.c\n-data <<BLOB\n-blob 1\n-BLOB\n-\n-commit refs/heads/S\n-mark :302\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-commit 2\n-COMMIT\n-from :301\n-M 100644 inline hello.c\n-data <<BLOB\n-blob 2\n-BLOB\n-\n-blob\n-mark :403\n-data <<BLOB\n-blob 3\n-BLOB\n-\n-blob\n-mark :202\n-data <<BLOB\n-note 2\n-BLOB\n-INPUT_END\n-\n test_expect_success 'S: initialize for S tests' '\n+\ttest_tick &&\n+\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/S\n+\tmark :301\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tcommit 1\n+\tCOMMIT\n+\tM 100644 inline hello.c\n+\tdata <<BLOB\n+\tblob 1\n+\tBLOB\n+\n+\tcommit refs/heads/S\n+\tmark :302\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tcommit 2\n+\tCOMMIT\n+\tfrom :301\n+\tM 100644 inline hello.c\n+\tdata <<BLOB\n+\tblob 2\n+\tBLOB\n+\n+\tblob\n+\tmark :403\n+\tdata <<BLOB\n+\tblob 3\n+\tBLOB\n+\n+\tblob\n+\tmark :202\n+\tdata <<BLOB\n+\tnote 2\n+\tBLOB\n+\tINPUT_END\n+\n \tgit fast-import --export-marks=marks <input\n '\n \n@@ -3002,103 +3016,103 @@ test_expect_success 'T: empty reset doesnt delete branch' '\n ### series U (filedelete)\n ###\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/U\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-test setup\n-COMMIT\n-M 100644 inline hello.c\n-data <<BLOB\n-blob 1\n-BLOB\n-M 100644 inline good/night.txt\n-data <<BLOB\n-sleep well\n-BLOB\n-M 100644 inline good/bye.txt\n-data <<BLOB\n-au revoir\n-BLOB\n-\n-INPUT_END\n-\n test_expect_success 'U: initialize for U tests' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/U\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\ttest setup\n+\tCOMMIT\n+\tM 100644 inline hello.c\n+\tdata <<BLOB\n+\tblob 1\n+\tBLOB\n+\tM 100644 inline good/night.txt\n+\tdata <<BLOB\n+\tsleep well\n+\tBLOB\n+\tM 100644 inline good/bye.txt\n+\tdata <<BLOB\n+\tau revoir\n+\tBLOB\n+\n+\tINPUT_END\n+\n \tgit fast-import <input\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/U\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-delete good/night.txt\n-COMMIT\n-from refs/heads/U^0\n-D good/night.txt\n+test_expect_success 'U: filedelete file succeeds' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/U\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tdelete good/night.txt\n+\tCOMMIT\n+\tfrom refs/heads/U^0\n+\tD good/night.txt\n \n-INPUT_END\n+\tINPUT_END\n \n-test_expect_success 'U: filedelete file succeeds' '\n \tgit fast-import <input\n '\n \n-cat >expect <<-EOF &&\n-:100644 000000 2907ebb4bf85d91bf0716bb3bd8a68ef48d6da76 0000000000000000000000000000000000000000 D\tgood/night.txt\n-EOF\n+test_expect_success 'U: validate file delete result' '\n+\tcat >expect <<-EOF &&\n+\t:100644 000000 2907ebb4bf85d91bf0716bb3bd8a68ef48d6da76 0000000000000000000000000000000000000000 D\tgood/night.txt\n+\tEOF\n \n-git diff-tree -M -r U^1 U >actual\n+\tgit diff-tree -M -r U^1 U >actual &&\n \n-test_expect_success 'U: validate file delete result' '\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/U\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-delete good dir\n-COMMIT\n-from refs/heads/U^0\n-D good\n+test_expect_success 'U: filedelete directory succeeds' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/U\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tdelete good dir\n+\tCOMMIT\n+\tfrom refs/heads/U^0\n+\tD good\n \n-INPUT_END\n+\tINPUT_END\n \n-test_expect_success 'U: filedelete directory succeeds' '\n \tgit fast-import <input\n '\n \n-cat >expect <<-EOF &&\n-:100644 000000 69cb75792f55123d8389c156b0b41c2ff00ed507 0000000000000000000000000000000000000000 D\tgood/bye.txt\n-EOF\n+test_expect_success 'U: validate directory delete result' '\n+\tcat >expect <<-EOF &&\n+\t:100644 000000 69cb75792f55123d8389c156b0b41c2ff00ed507 0000000000000000000000000000000000000000 D\tgood/bye.txt\n+\tEOF\n \n-git diff-tree -M -r U^1 U >actual\n+\tgit diff-tree -M -r U^1 U >actual &&\n \n-test_expect_success 'U: validate directory delete result' '\n \tcompare_diff_raw expect actual\n '\n \n-cat >input <<-INPUT_END &&\n-commit refs/heads/U\n-committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n-data <<COMMIT\n-must succeed\n-COMMIT\n-from refs/heads/U^0\n-D \"\"\n+test_expect_success 'U: filedelete root succeeds' '\n+\tcat >input <<-INPUT_END &&\n+\tcommit refs/heads/U\n+\tcommitter $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE\n+\tdata <<COMMIT\n+\tmust succeed\n+\tCOMMIT\n+\tfrom refs/heads/U^0\n+\tD \"\"\n \n-INPUT_END\n+\tINPUT_END\n \n-test_expect_success 'U: filedelete root succeeds' '\n \tgit fast-import <input\n '\n \n-cat >expect <<-EOF &&\n-:100644 000000 c18147dc648481eeb65dc5e66628429a64843327 0000000000000000000000000000000000000000 D\thello.c\n-EOF\n+test_expect_success 'U: validate root delete result' '\n+\tcat >expect <<-EOF &&\n+\t:100644 000000 c18147dc648481eeb65dc5e66628429a64843327 0000000000000000000000000000000000000000 D\thello.c\n+\tEOF\n \n-git diff-tree -M -r U^1 U >actual\n+\tgit diff-tree -M -r U^1 U >actual &&\n \n-test_expect_success 'U: validate root delete result' '\n \tcompare_diff_raw expect actual\n '\n \n-- \n2.6.2.337.ga235d84\n"},{"id":"273521","messageId":"CAPig+cSH+BnvnzVY=YhRknynyWkAdbXNMvvrb7GcjEnf6UDFug@mail.gmail.com","threadId":"40837","inReplyTo":"cover.1447959452.git.j6t@kdbg.org","subject":"Re: [PATCH 0/7] Modernize t9300-fast-import","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-11-20T03:54:11Z","receivedAt":"2015-11-20T03:54:11Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Nov 19, 2015 at 2:09 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n> Some time ago, I had to dig into t9300-fast-import and found it quite\n> unhelpful that it does not follow our modern best-practices. This series\n> brings it up-to-date. I thought I submit it now while it is quiet in\n> the area.\n>\n> The larger patches are best viewed using -w -color-words because the\n> regular patch text is ... overwhelming.\n\nFor what it's worth, I read through the series (with care, I hope) and\ndidn't find anything amiss.\n\n> Improving shell coding style is outside the scope of this series. I mean\n> fixing eyesores such as 'cat >foo <<EOF && cat foo | sort > bar', or minor\n> things such as quoting <<\\EOF when the here-doc does not require\n> substitutions.\n"},{"id":"273532","messageId":"20151120112223.GD11198@sigill.intra.peff.net","threadId":"40837","inReplyTo":"CAPig+cSH+BnvnzVY=YhRknynyWkAdbXNMvvrb7GcjEnf6UDFug@mail.gmail.com","subject":"Re: [PATCH 0/7] Modernize t9300-fast-import","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2015-11-20T11:22:23Z","receivedAt":"2015-11-20T11:22:23Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Nov 19, 2015 at 10:54:11PM -0500, Eric Sunshine wrote:\n\n> On Thu, Nov 19, 2015 at 2:09 PM, Johannes Sixt <j6t@kdbg.org> wrote:\n> > Some time ago, I had to dig into t9300-fast-import and found it quite\n> > unhelpful that it does not follow our modern best-practices. This series\n> > brings it up-to-date. I thought I submit it now while it is quiet in\n> > the area.\n> >\n> > The larger patches are best viewed using -w -color-words because the\n> > regular patch text is ... overwhelming.\n> \n> For what it's worth, I read through the series (with care, I hope) and\n> didn't find anything amiss.\n\nThanks, both. I gave it a quick read and didn't see anything wrong. The\nend result is certainly nicer to read. :)\n\n-Peff\n"}]}