X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft9300-fast-import.sh;h=0595041af5d310f905306c6a289945cde26d88fc;hb=da0204df587ae76cd291bc7e495fc60d873c2f20;hp=970d683650f5ee6b99a07ff10063710292b28ed1;hpb=3ed02de2f46105cbc45fcc8f3287513f470eb4a3;p=git.git
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 970d68365..0595041af 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -60,10 +60,10 @@ INPUT_END
test_expect_success \
'A: create pack from stdin' \
'git-fast-import --export-marks=marks.out expect < $GIT_COMMITTER_DATE
@@ -73,8 +73,8 @@ initial
EOF
test_expect_success \
'A: verify commit' \
- 'git-cat-file commit master | sed 1d >actual &&
- diff -u expect actual'
+ 'git cat-file commit master | sed 1d >actual &&
+ git diff expect actual'
cat >expect <expect <actual &&
- diff -u expect actual'
+ 'git cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >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 <input < $GIT_COMMITTER_DATE
+data <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`'
###
### series B
@@ -133,12 +170,59 @@ test_expect_failure \
'git-fast-import input < $GIT_COMMITTER_DATE
+data <input < $GIT_COMMITTER_DATE
+data <input < $GIT_COMMITTER_DATE
+data <input <expect < $GIT_COMMITTER_DATE
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -174,15 +258,15 @@ second
EOF
test_expect_success \
'C: verify commit' \
- 'git-cat-file commit branch | sed 1d >actual &&
- diff -u expect actual'
+ 'git cat-file commit branch | sed 1d >actual &&
+ git diff expect actual'
cat >expect <actual
+git diff-tree -M -r master branch >actual
test_expect_success \
'C: validate rename result' \
'compare_diff_raw expect actual'
@@ -214,16 +298,16 @@ INPUT_END
test_expect_success \
'D: inline data in commit' \
'git-fast-import expect <actual
+git diff-tree -M -r branch^ branch >actual
test_expect_success \
'D: validate new files added' \
'compare_diff_raw expect actual'
@@ -231,14 +315,14 @@ test_expect_success \
echo "$file5_data" >expect
test_expect_success \
'D: verify file5' \
- 'git-cat-file blob branch:newdir/interesting >actual &&
- diff -u expect actual'
+ 'git cat-file blob branch:newdir/interesting >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 cat-file blob branch:newdir/exec.sh >actual &&
+ git diff expect actual'
###
### series E
@@ -263,7 +347,7 @@ test_expect_success \
'git-fast-import --date-format=rfc2822 expect < 1170778938 -0500
@@ -273,14 +357,14 @@ RFC 2822 type date
EOF
test_expect_success \
'E: verify commit' \
- 'git-cat-file commit branch | sed 1,2d >actual &&
- diff -u expect actual'
+ 'git cat-file commit branch | sed 1,2d >actual &&
+ git diff expect actual'
###
### series F
###
-old_branch=`git-rev-parse --verify branch^0`
+old_branch=`git rev-parse --verify branch^0`
test_tick
cat >input <expect < $GIT_COMMITTER_DATE
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -326,14 +410,14 @@ losing things already?
EOF
test_expect_success \
'F: verify other commit' \
- 'git-cat-file commit other >actual &&
- diff -u expect actual'
+ 'git cat-file commit other >actual &&
+ git diff expect actual'
###
### series G
###
-old_branch=`git-rev-parse --verify branch^0`
+old_branch=`git rev-parse --verify branch^0`
test_tick
cat >input <expect <expect <actual
+git diff-tree -M -r H^ H >actual
test_expect_success \
'H: validate old files removed, new files added' \
'compare_diff_raw expect actual'
@@ -404,8 +488,8 @@ test_expect_success \
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 cat-file blob H:h/e/l/lo >actual &&
+ git diff expect actual'
###
### series I
@@ -426,12 +510,12 @@ test_expect_success \
'git-fast-import --export-pack-edges=edges.list expect <actual &&
- diff -u expect actual'
+ git diff expect actual'
###
### series J
@@ -460,7 +544,7 @@ test_expect_success \
'git-fast-import input < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data <expect <output &&
+ git diff expect output'
+
+###
+### series M
+###
+
+test_tick
+cat >input < $GIT_COMMITTER_DATE
+data <expect <actual &&
+ compare_diff_raw expect actual'
+
+cat >input < $GIT_COMMITTER_DATE
+data <expect <actual &&
+ compare_diff_raw expect actual'
+
+cat >input < $GIT_COMMITTER_DATE
+data <expect <actual &&
+ compare_diff_raw expect actual'
+
+###
+### series N
+###
+
+test_tick
+cat >input < $GIT_COMMITTER_DATE
+data <expect <actual &&
+ compare_diff_raw expect actual'
+
+cat >input < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data <expect <actual &&
+ compare_diff_raw expect actual'
+
+cat >input < $GIT_COMMITTER_DATE
+data <input < $GIT_COMMITTER_DATE
+# $GIT_COMMITTER_NAME has inserted here for his benefit.
+data <input < $GIT_COMMITTER_DATE
+data <input < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data <expect <actual &&
+ git diff expect actual'
+
+cat >input < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data < $GIT_COMMITTER_DATE
+data <actual &&
+ grep "progress " expect &&
+ git diff expect actual'
test_done