diff options
Diffstat (limited to 't/t9300-fast-import.sh')
-rwxr-xr-x | t/t9300-fast-import.sh | 78 |
1 files changed, 64 insertions, 14 deletions
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh index 2e1a09ff2d..8e958da536 100755 --- a/t/t9300-fast-import.sh +++ b/t/t9300-fast-import.sh @@ -74,7 +74,7 @@ EOF test_expect_success \ 'A: verify commit' \ 'git-cat-file commit master | sed 1d >actual && - diff -u expect actual' + git diff expect actual' cat >expect <<EOF 100644 blob file2 @@ -84,22 +84,22 @@ EOF test_expect_success \ 'A: verify tree' \ 'git-cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual && - diff -u expect actual' + git diff expect actual' echo "$file2_data" >expect test_expect_success \ 'A: verify file2' \ - 'git-cat-file blob master:file2 >actual && diff -u expect actual' + 'git-cat-file blob master:file2 >actual && git diff expect actual' echo "$file3_data" >expect test_expect_success \ 'A: verify file3' \ - 'git-cat-file blob master:file3 >actual && diff -u expect actual' + 'git-cat-file blob master:file3 >actual && git diff expect actual' printf "$file4_data" >expect test_expect_success \ 'A: verify file4' \ - 'git-cat-file blob master:file4 >actual && diff -u expect actual' + 'git-cat-file blob master:file4 >actual && git diff expect actual' cat >expect <<EOF :2 `git-rev-parse --verify master:file2` @@ -109,7 +109,7 @@ cat >expect <<EOF EOF test_expect_success \ 'A: verify marks output' \ - 'diff -u expect marks.out' + 'git diff expect marks.out' test_expect_success \ 'A: verify marks import' \ @@ -117,7 +117,7 @@ test_expect_success \ --import-marks=marks.out \ --export-marks=marks.new \ </dev/null && - diff -u expect marks.new' + git diff -u expect marks.new' ### ### series B @@ -183,7 +183,7 @@ EOF test_expect_success \ 'C: verify commit' \ 'git-cat-file commit branch | sed 1d >actual && - diff -u expect actual' + git diff expect actual' cat >expect <<EOF :000000 100755 0000000000000000000000000000000000000000 f1fb5da718392694d0076d677d6d0e364c79b0bc A file2/newf @@ -240,13 +240,13 @@ echo "$file5_data" >expect test_expect_success \ 'D: verify file5' \ 'git-cat-file blob branch:newdir/interesting >actual && - diff -u expect actual' + git diff expect actual' echo "$file6_data" >expect test_expect_success \ 'D: verify file6' \ 'git-cat-file blob branch:newdir/exec.sh >actual && - diff -u expect actual' + git diff expect actual' ### ### series E @@ -282,7 +282,7 @@ EOF test_expect_success \ 'E: verify commit' \ 'git-cat-file commit branch | sed 1,2d >actual && - diff -u expect actual' + git diff expect actual' ### ### series F @@ -335,7 +335,7 @@ EOF test_expect_success \ 'F: verify other commit' \ 'git-cat-file commit other >actual && - diff -u expect actual' + git diff expect actual' ### ### series G @@ -413,7 +413,7 @@ echo "$file5_data" >expect test_expect_success \ 'H: verify file' \ 'git-cat-file blob H:h/e/l/lo >actual && - diff -u expect actual' + git diff expect actual' ### ### series I @@ -439,7 +439,7 @@ EOF test_expect_success \ 'I: verify edge list' \ 'sed -e s/pack-.*pack/pack-.pack/ edges.list >actual && - diff -u expect actual' + git diff expect actual' ### ### series J @@ -501,4 +501,54 @@ test_expect_success \ 'test `git-rev-parse --verify branch^1` \ = `git-rev-parse --verify K^1`' +### +### series L +### + +cat >input <<INPUT_END +blob +mark :1 +data <<EOF +some data +EOF + +blob +mark :2 +data <<EOF +other data +EOF + +commit refs/heads/L +committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE +data <<COMMIT +create L +COMMIT + +M 644 :1 b. +M 644 :1 b/other +M 644 :1 ba + +commit refs/heads/L +committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE +data <<COMMIT +update L +COMMIT + +M 644 :2 b. +M 644 :2 b/other +M 644 :2 ba +INPUT_END + +cat >expect <<EXPECT_END +:100644 100644 4268632... 55d3a52... M b. +:040000 040000 0ae5cac... 443c768... M b +:100644 100644 4268632... 55d3a52... M ba +EXPECT_END + +test_expect_success \ + 'L: verify internal tree sorting' \ + 'git-fast-import <input && + git-diff --raw L^ L >output && + git diff expect output' + test_done |