From d67824feaa1613d363834b93e40c70b93791952b Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Thu, 19 Nov 2015 20:09:43 +0100 Subject: [PATCH] modernize t9300: single-quote placement and indentation Many test cases do not follow our modern style that places the single-quotes that surround the shell code snippets before and after the shell code. Make it so. Many of the lines changed in this way are indented other than by a single tab. Change them (and some additional lines) to be indented with a tab. Signed-off-by: Johannes Sixt Signed-off-by: Jeff King --- t/t9300-fast-import.sh | 872 +++++++++++++++++++++++++------------------------ 1 file changed, 437 insertions(+), 435 deletions(-) diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 9984c48b5..566f7bdd3 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -100,10 +100,10 @@ An annotated tag that annotates a blob. EOF INPUT_END -test_expect_success \ - 'A: create pack from stdin' \ - 'git fast-import --export-marks=marks.out $GIT_COMMITTER_DATE initial EOF -test_expect_success \ - 'A: verify commit' \ - 'git cat-file commit master | sed 1d >actual && - test_cmp expect actual' +test_expect_success 'A: verify commit' ' + git cat-file commit master | sed 1d >actual && + test_cmp expect actual +' cat >expect <actual && - test_cmp expect actual' +test_expect_success 'A: verify tree' ' + git cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual && + test_cmp expect actual +' echo "$file2_data" >expect -test_expect_success \ - 'A: verify file2' \ - 'git cat-file blob master:file2 >actual && test_cmp expect actual' +test_expect_success 'A: verify file2' ' + git cat-file blob master:file2 >actual && test_cmp expect actual +' echo "$file3_data" >expect -test_expect_success \ - 'A: verify file3' \ - 'git cat-file blob master:file3 >actual && test_cmp expect actual' +test_expect_success 'A: verify file3' ' + git cat-file blob master:file3 >actual && test_cmp expect actual +' printf "$file4_data" >expect -test_expect_success \ - 'A: verify file4' \ - 'git cat-file blob master:file4 >actual && test_cmp expect actual' +test_expect_success 'A: verify file4' ' + git cat-file blob master:file4 >actual && test_cmp expect actual +' cat >expect <expect <actual && git cat-file tag tags/series-A-blob-3 >>actual && - test_cmp expect actual' + test_cmp expect actual +' test_tick cat >input <expect <actual -test_expect_success \ - 'A: verify diff' \ - 'compare_diff_raw expect actual && - test `git rev-parse --verify master:file2` \ - = `git rev-parse --verify verify--import-marks:copy-of-file2`' +test_expect_success 'A: verify diff' ' + compare_diff_raw expect actual && + test `git rev-parse --verify master:file2` \ + = `git rev-parse --verify verify--import-marks:copy-of-file2` +' test_tick mt=$(git hash-object --stdin < /dev/null) @@ -322,7 +322,8 @@ test_expect_success 'A: export marks with large values' ' cat input.blob input.commit | git fast-import --export-marks=marks.large && git ls-tree refs/heads/verify--dump-marks >tree.out && test_cmp tree.exp_s tree.out && - test_cmp marks.exp marks.large' + test_cmp marks.exp marks.large +' ### ### series B @@ -342,7 +343,7 @@ M 755 0000000000000000000000000000000000000001 zero1 INPUT_END test_expect_success 'B: fail on invalid blob sha1' ' - test_must_fail git fast-import /dev/null >/dev/null @@ -482,19 +483,19 @@ M 755 $newf file2/newf D file3 INPUT_END -test_expect_success \ - 'C: incremental import create pack from stdin' \ - 'git fast-import expect < $GIT_COMMITTER_DATE second EOF -test_expect_success \ - 'C: verify commit' \ - 'git cat-file commit branch | sed 1d >actual && - test_cmp expect actual' +test_expect_success 'C: verify commit' ' + git cat-file commit branch | sed 1d >actual && + test_cmp expect actual +' cat >expect <expect <actual -test_expect_success \ - 'C: validate rename result' \ - 'compare_diff_raw expect actual' +test_expect_success 'C: validate rename result' ' + compare_diff_raw expect actual +' ### ### series D @@ -542,10 +543,10 @@ $file6_data EOF INPUT_END -test_expect_success \ - 'D: inline data in commit' \ - 'git fast-import expect <actual -test_expect_success \ - 'D: validate new files added' \ - 'compare_diff_raw expect actual' +test_expect_success 'D: validate new files added' ' + compare_diff_raw expect actual +' echo "$file5_data" >expect -test_expect_success \ - 'D: verify file5' \ - 'git cat-file blob branch:newdir/interesting >actual && - test_cmp expect actual' +test_expect_success 'D: verify file5' ' + git cat-file blob branch:newdir/interesting >actual && + test_cmp expect actual +' echo "$file6_data" >expect -test_expect_success \ - 'D: verify file6' \ - 'git cat-file blob branch:newdir/exec.sh >actual && - test_cmp expect actual' +test_expect_success 'D: verify file6' ' + git cat-file blob branch:newdir/exec.sh >actual && + test_cmp expect actual +' ### ### series E @@ -588,11 +589,11 @@ from refs/heads/branch^0 INPUT_END test_expect_success 'E: rfc2822 date, --date-format=raw' ' - test_must_fail git fast-import --date-format=raw 1170783302 -0500 RFC 2822 type date EOF -test_expect_success \ - 'E: verify commit' \ - 'git cat-file commit branch | sed 1,2d >actual && - test_cmp expect actual' +test_expect_success 'E: verify commit' ' + git cat-file commit branch | sed 1,2d >actual && + test_cmp expect actual +' ### ### series F @@ -628,13 +629,12 @@ reset refs/heads/other from refs/heads/branch INPUT_END -test_expect_success \ - 'F: non-fast-forward update skips' \ - 'if git fast-import $GIT_COMMITTER_DATE losing things already? EOF -test_expect_success \ - 'F: verify other commit' \ - 'git cat-file commit other >actual && - test_cmp expect actual' +test_expect_success 'F: verify other commit' ' + git cat-file commit other >actual && + test_cmp expect actual +' ### ### series G @@ -679,18 +679,18 @@ COMMIT from refs/heads/branch~1 INPUT_END -test_expect_success \ - 'G: non-fast-forward update forced' \ - 'git fast-import --force expect <actual -test_expect_success \ - 'H: validate old files removed, new files added' \ - 'compare_diff_raw expect actual' +test_expect_success 'H: validate old files removed, new files added' ' + compare_diff_raw expect actual +' echo "$file5_data" >expect -test_expect_success \ - 'H: verify file' \ - 'git cat-file blob H:h/e/l/lo >actual && - test_cmp expect actual' +test_expect_success 'H: verify file' ' + git cat-file blob H:h/e/l/lo >actual && + test_cmp expect actual +' ### ### series I @@ -758,17 +758,17 @@ COMMIT from refs/heads/branch INPUT_END -test_expect_success \ - 'I: export-pack-edges' \ - 'git fast-import --export-pack-edges=edges.list expect <actual && - test_cmp expect actual' +test_expect_success 'I: verify edge list' ' + sed -e s/pack-.*pack/pack-.pack/ edges.list >actual && + test_cmp expect actual +' ### ### series J @@ -792,13 +792,13 @@ initialize J COMMIT INPUT_END -test_expect_success \ - 'J: reset existing branch creates empty commit' \ - 'git fast-import input <expect <output && - test_cmp expect output' +test_expect_success 'L: verify internal tree sorting' ' + git fast-import output && + test_cmp expect output +' cat >input <tmp && cat tmp | cut -f 2 >actual && test_cmp expect actual && - git fsck `git rev-parse L2`' + git fsck `git rev-parse L2` +' git update-ref -d refs/heads/L2 @@ -953,11 +953,11 @@ INPUT_END cat >expect <actual && - compare_diff_raw expect actual' +test_expect_success 'M: rename file in same subdirectory' ' + git fast-import actual && + compare_diff_raw expect actual +' cat >input <expect <actual && - compare_diff_raw expect actual' +test_expect_success 'M: rename file to new subdirectory' ' + git fast-import actual && + compare_diff_raw expect actual +' cat >input <expect <actual && - compare_diff_raw expect actual' +test_expect_success 'M: rename subdirectory to new subdirectory' ' + git fast-import actual && + compare_diff_raw expect actual +' cat >input <expect <actual && - cat actual && - compare_diff_raw expect actual' +test_expect_success 'M: rename root to subdirectory' ' + git fast-import actual && + cat actual && + compare_diff_raw expect actual +' ### ### series N @@ -1047,11 +1047,11 @@ INPUT_END cat >expect <actual && - compare_diff_raw expect actual' +test_expect_success 'N: copy file in same subdirectory' ' + git fast-import actual && + compare_diff_raw expect actual +' cat >input <expect <actual && - compare_diff_raw expect actual' +test_expect_success 'N: copy then modify subdirectory' ' + git fast-import actual && + compare_diff_raw expect actual +' cat >input <expect <<-\EOF && +test_expect_success 'N: copy directory by id' ' + cat >expect <<-\EOF && :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf file3/newf :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100 file2/oldf file3/oldf EOF - subdir=$(git rev-parse refs/heads/branch^0:file2) && - cat >input <<-INPUT_END && + subdir=$(git rev-parse refs/heads/branch^0:file2) && + cat >input <<-INPUT_END && commit refs/heads/N4 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE data <actual && - compare_diff_raw expect actual' + git fast-import actual && + compare_diff_raw expect actual +' test_expect_success PIPE 'N: read and copy directory' ' cat >expect <<-\EOF && @@ -1202,14 +1202,13 @@ test_expect_success PIPE 'N: empty directory reads as missing' ' test_cmp expect actual ' -test_expect_success \ - 'N: copy root directory by tree hash' \ - 'cat >expect <<-\EOF && +test_expect_success 'N: copy root directory by tree hash' ' + cat >expect <<-\EOF && :100755 000000 f1fb5da718392694d0076d677d6d0e364c79b0bc 0000000000000000000000000000000000000000 D file3/newf :100644 000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 0000000000000000000000000000000000000000 D file3/oldf EOF - root=$(git rev-parse refs/heads/branch^0^{tree}) && - cat >input <<-INPUT_END && + root=$(git rev-parse refs/heads/branch^0^{tree}) && + cat >input <<-INPUT_END && commit refs/heads/N6 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE data <actual && - compare_diff_raw expect actual' + git fast-import actual && + compare_diff_raw expect actual +' -test_expect_success \ - 'N: copy root by path' \ - 'cat >expect <<-\EOF && +test_expect_success 'N: copy root by path' ' + cat >expect <<-\EOF && :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf oldroot/file2/newf :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100 file2/oldf oldroot/file2/oldf :100755 100755 85df50785d62d3b05ab03d9cbf7e4a0b49449730 85df50785d62d3b05ab03d9cbf7e4a0b49449730 C100 file4 oldroot/file4 :100755 100755 e74b7d465e52746be2b4bae983670711e6e66657 e74b7d465e52746be2b4bae983670711e6e66657 C100 newdir/exec.sh oldroot/newdir/exec.sh :100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100 newdir/interesting oldroot/newdir/interesting EOF - cat >input <<-INPUT_END && + cat >input <<-INPUT_END && commit refs/heads/N-copy-root-path committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE data <actual && - compare_diff_raw expect actual' + git fast-import actual && + compare_diff_raw expect actual +' -test_expect_success \ - 'N: delete directory by copying' \ - 'cat >expect <<-\EOF && +test_expect_success 'N: delete directory by copying' ' + cat >expect <<-\EOF && OBJID :100644 000000 OBJID OBJID D foo/bar/qux OBJID :000000 100644 OBJID OBJID A foo/bar/baz :000000 100644 OBJID OBJID A foo/bar/qux EOF - empty_tree=$(git mktree input <<-INPUT_END && + empty_tree=$(git mktree input <<-INPUT_END && commit refs/heads/N-delete committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE data <actual && - test_cmp expect actual' + test_cmp expect actual +' -test_expect_success \ - 'N: modify copied tree' \ - 'cat >expect <<-\EOF && +test_expect_success 'N: modify copied tree' ' + cat >expect <<-\EOF && :100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 C100 newdir/interesting file3/file5 :100755 100755 f1fb5da718392694d0076d677d6d0e364c79b0bc f1fb5da718392694d0076d677d6d0e364c79b0bc C100 file2/newf file3/newf :100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 C100 file2/oldf file3/oldf EOF - subdir=$(git rev-parse refs/heads/branch^0:file2) && - cat >input <<-INPUT_END && + subdir=$(git rev-parse refs/heads/branch^0:file2) && + cat >input <<-INPUT_END && commit refs/heads/N5 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE data <actual && - compare_diff_raw expect actual' - -test_expect_success \ - 'N: reject foo/ syntax' \ - 'subdir=$(git rev-parse refs/heads/branch^0:file2) && - test_must_fail git fast-import <<-INPUT_END + git fast-import actual && + compare_diff_raw expect actual +' + +test_expect_success 'N: reject foo/ syntax' ' + subdir=$(git rev-parse refs/heads/branch^0:file2) && + test_must_fail git fast-import <<-INPUT_END commit refs/heads/N5B committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE data < $GIT_COMMITTER_DATE data < $GIT_COMMITTER_DATE data < $GIT_COMMITTER_DATE data <expect.foo && - echo hello >expect.bar && - git fast-import <<-SETUP_END && +test_expect_success 'N: copy to root by id and modify' ' + echo "hello, world" >expect.foo && + echo hello >expect.bar && + git fast-import <<-SETUP_END && commit refs/heads/N7 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE data < $GIT_COMMITTER_DATE data <actual.foo && - git show N8:foo/bar >actual.bar && - test_cmp expect.foo actual.foo && - test_cmp expect.bar actual.bar' - -test_expect_success \ - 'N: extract subtree' \ - 'branch=$(git rev-parse --verify refs/heads/branch^{tree}) && - cat >input <<-INPUT_END && + git show N8:foo/foo >actual.foo && + git show N8:foo/bar >actual.bar && + test_cmp expect.foo actual.foo && + test_cmp expect.bar actual.bar +' + +test_expect_success 'N: extract subtree' ' + branch=$(git rev-parse --verify refs/heads/branch^{tree}) && + cat >input <<-INPUT_END && commit refs/heads/N9 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE data <expect.baz && - echo hello, world >expect.qux && - git fast-import <<-SETUP_END && + git fast-import expect.baz && + echo hello, world >expect.qux && + git fast-import <<-SETUP_END && commit refs/heads/N10 committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE data < $GIT_COMMITTER_DATE data <actual.baz && - git show N11:bar/qux >actual.qux && - git show N11:bar/quux >actual.quux && - test_cmp expect.baz actual.baz && - test_cmp expect.qux actual.qux && - test_cmp expect.qux actual.quux' + git show N11:bar/baz >actual.baz && + git show N11:bar/qux >actual.qux && + git show N11:bar/quux >actual.quux && + test_cmp expect.baz actual.baz && + test_cmp expect.qux actual.qux && + test_cmp expect.qux actual.quux' ### ### series O @@ -1503,10 +1502,10 @@ D file2/file5 INPUT_END -test_expect_success \ - 'O: comments are all skipped' \ - 'git fast-import input <input <actual && - test_cmp expect actual' +test_expect_success 'O: blank lines not necessary after other commands' ' + git fast-import actual && + test_cmp expect actual +' cat >input <actual && - grep "progress " expect && - test_cmp expect actual' +test_expect_success 'O: progress outputs as requested by input' ' + git fast-import actual && + grep "progress " expect && + test_cmp expect actual +' ### ### series P (gitlinks) @@ -1667,16 +1666,16 @@ M 160000 :6 sub INPUT_END -test_expect_success \ - 'P: superproject & submodule mix' \ - 'git fast-import input <input < $GIT_COMMITTER_DATE first (:3) EOF -test_expect_success \ - 'Q: verify first commit' \ - 'git cat-file commit notes-test~2 | sed 1d >actual && - test_cmp expect actual' +test_expect_success 'Q: verify first commit' ' + git cat-file commit notes-test~2 | sed 1d >actual && + test_cmp expect actual +' cat >expect < $GIT_COMMITTER_DATE second (:5) EOF -test_expect_success \ - 'Q: verify second commit' \ - 'git cat-file commit notes-test^ | sed 1d >actual && - test_cmp expect actual' +test_expect_success 'Q: verify second commit' ' + git cat-file commit notes-test^ | sed 1d >actual && + test_cmp expect actual +' cat >expect < $GIT_COMMITTER_DATE third (:6) EOF -test_expect_success \ - 'Q: verify third commit' \ - 'git cat-file commit notes-test | sed 1d >actual && - test_cmp expect actual' +test_expect_success 'Q: verify third commit' ' + git cat-file commit notes-test | sed 1d >actual && + test_cmp expect actual +' cat >expect < $GIT_COMMITTER_DATE @@ -1936,10 +1937,10 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE notes (:9) EOF -test_expect_success \ - 'Q: verify first notes commit' \ - 'git cat-file commit refs/notes/foobar~2 | sed 1d >actual && - test_cmp expect actual' +test_expect_success 'Q: verify first notes commit' ' + git cat-file commit refs/notes/foobar~2 | sed 1d >actual && + test_cmp expect actual +' cat >expect.unsorted <expect.unsorted <expect -test_expect_success \ - 'Q: verify first notes tree' \ - 'git cat-file -p refs/notes/foobar~2^{tree} | sed "s/ [0-9a-f]* / /" >actual && - test_cmp expect actual' +test_expect_success 'Q: verify first notes tree' ' + git cat-file -p refs/notes/foobar~2^{tree} | sed "s/ [0-9a-f]* / /" >actual && + test_cmp expect actual +' echo "$note1_data" >expect -test_expect_success \ - 'Q: verify first note for first commit' \ - 'git cat-file blob refs/notes/foobar~2:$commit1 >actual && test_cmp expect actual' +test_expect_success 'Q: verify first note for first commit' ' + git cat-file blob refs/notes/foobar~2:$commit1 >actual && test_cmp expect actual +' echo "$note2_data" >expect -test_expect_success \ - 'Q: verify first note for second commit' \ - 'git cat-file blob refs/notes/foobar~2:$commit2 >actual && test_cmp expect actual' +test_expect_success 'Q: verify first note for second commit' ' + git cat-file blob refs/notes/foobar~2:$commit2 >actual && test_cmp expect actual +' echo "$note3_data" >expect -test_expect_success \ - 'Q: verify first note for third commit' \ - 'git cat-file blob refs/notes/foobar~2:$commit3 >actual && test_cmp expect actual' +test_expect_success 'Q: verify first note for third commit' ' + git cat-file blob refs/notes/foobar~2:$commit3 >actual && test_cmp expect actual +' cat >expect < $GIT_COMMITTER_DATE notes (:10) EOF -test_expect_success \ - 'Q: verify second notes commit' \ - 'git cat-file commit refs/notes/foobar^ | sed 1d >actual && - test_cmp expect actual' +test_expect_success 'Q: verify second notes commit' ' + git cat-file commit refs/notes/foobar^ | sed 1d >actual && + test_cmp expect actual +' cat >expect.unsorted <expect.unsorted <expect -test_expect_success \ - 'Q: verify second notes tree' \ - 'git cat-file -p refs/notes/foobar^^{tree} | sed "s/ [0-9a-f]* / /" >actual && - test_cmp expect actual' +test_expect_success 'Q: verify second notes tree' ' + git cat-file -p refs/notes/foobar^^{tree} | sed "s/ [0-9a-f]* / /" >actual && + test_cmp expect actual +' echo "$note1b_data" >expect -test_expect_success \ - 'Q: verify second note for first commit' \ - 'git cat-file blob refs/notes/foobar^:$commit1 >actual && test_cmp expect actual' +test_expect_success 'Q: verify second note for first commit' ' + git cat-file blob refs/notes/foobar^:$commit1 >actual && test_cmp expect actual +' echo "$note2_data" >expect -test_expect_success \ - 'Q: verify first note for second commit' \ - 'git cat-file blob refs/notes/foobar^:$commit2 >actual && test_cmp expect actual' +test_expect_success 'Q: verify first note for second commit' ' + git cat-file blob refs/notes/foobar^:$commit2 >actual && test_cmp expect actual +' echo "$note3_data" >expect -test_expect_success \ - 'Q: verify first note for third commit' \ - 'git cat-file blob refs/notes/foobar^:$commit3 >actual && test_cmp expect actual' +test_expect_success 'Q: verify first note for third commit' ' + git cat-file blob refs/notes/foobar^:$commit3 >actual && test_cmp expect actual +' cat >expect < $GIT_COMMITTER_DATE @@ -2011,24 +2012,24 @@ committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE notes (:11) EOF -test_expect_success \ - 'Q: verify third notes commit' \ - 'git cat-file commit refs/notes/foobar2 | sed 1d >actual && - test_cmp expect actual' +test_expect_success 'Q: verify third notes commit' ' + git cat-file commit refs/notes/foobar2 | sed 1d >actual && + test_cmp expect actual +' cat >expect.unsorted <expect -test_expect_success \ - 'Q: verify third notes tree' \ - 'git cat-file -p refs/notes/foobar2^{tree} | sed "s/ [0-9a-f]* / /" >actual && - test_cmp expect actual' +test_expect_success 'Q: verify third notes tree' ' + git cat-file -p refs/notes/foobar2^{tree} | sed "s/ [0-9a-f]* / /" >actual && + test_cmp expect actual +' echo "$note1c_data" >expect -test_expect_success \ - 'Q: verify third note for first commit' \ - 'git cat-file blob refs/notes/foobar2:$commit1 >actual && test_cmp expect actual' +test_expect_success 'Q: verify third note for first commit' ' + git cat-file blob refs/notes/foobar2:$commit1 >actual && test_cmp expect actual +' cat >expect < $GIT_COMMITTER_DATE notes (:12) EOF -test_expect_success \ - 'Q: verify fourth notes commit' \ - 'git cat-file commit refs/notes/foobar | sed 1d >actual && - test_cmp expect actual' +test_expect_success 'Q: verify fourth notes commit' ' + git cat-file commit refs/notes/foobar | sed 1d >actual && + test_cmp expect actual +' cat >expect.unsorted <expect -test_expect_success \ - 'Q: verify fourth notes tree' \ - 'git cat-file -p refs/notes/foobar^{tree} | sed "s/ [0-9a-f]* / /" >actual && - test_cmp expect actual' +test_expect_success 'Q: verify fourth notes tree' ' + git cat-file -p refs/notes/foobar^{tree} | sed "s/ [0-9a-f]* / /" >actual && + test_cmp expect actual +' echo "$note2b_data" >expect -test_expect_success \ - 'Q: verify second note for second commit' \ - 'git cat-file blob refs/notes/foobar:$commit2 >actual && test_cmp expect actual' +test_expect_success 'Q: verify second note for second commit' ' + git cat-file blob refs/notes/foobar:$commit2 >actual && test_cmp expect actual +' cat >input <input <input < one.marks && - tail -n +3 marks.out > two.marks && - git fast-import --import-marks=one.marks --import-marks=two.marks one.marks && + tail -n +3 marks.out > two.marks && + git fast-import --import-marks=one.marks --import-marks=two.marks input <input < output && - test_cmp empty output + cat input | git fast-import 2> output && + test_cmp empty output ' test_expect_success 'R: feature done means terminating "done" is mandatory' ' @@ -2609,11 +2610,11 @@ option git non-existing-option EOF test_expect_success 'R: die on unknown option' ' - test_must_fail git fast-import >input echo >>input -test_expect_success \ - 'R: blob bigger than threshold' \ - 'test_create_repo R && - git --git-dir=R/.git fast-import --big-file-threshold=1 actual && - test_cmp_bin expect actual && - a=$(git --git-dir=R/.git rev-parse big-file:big1) && - b=$(git --git-dir=R/.git rev-parse big-file:big2) && - test $a = $b' -test_expect_success \ - 'R: blob appears only once' \ - 'n=$(grep $a verify | wc -l) && - test 1 = $n' +test_expect_success 'R: verify written objects' ' + git --git-dir=R/.git cat-file blob big-file:big1 >actual && + test_cmp_bin expect actual && + a=$(git --git-dir=R/.git rev-parse big-file:big1) && + b=$(git --git-dir=R/.git rev-parse big-file:big2) && + test $a = $b +' + +test_expect_success 'R: blob appears only once' ' + n=$(grep $a verify | wc -l) && + test 1 = $n +' ### ### series S @@ -3088,7 +3090,7 @@ D "" INPUT_END test_expect_success 'U: filedelete root succeeds' ' - git fast-import expect <