X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft9300-fast-import.sh;h=91b5aced1bcea74a66c3365e4aceff355d577f6a;hb=7b51b77dbc71e83789f59f0cd559489115478f27;hp=c4f4465dc687d30138a9111ae2efbc0e3aaf42b6;hpb=37bd6c5a2a1dbefdcbc0120451b95f82055f160f;p=git.git
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index c4f4465dc..91b5aced1 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -3,9 +3,9 @@
# Copyright (c) 2007 Shawn Pearce
#
-test_description='test git-fast-import utility'
+test_description='test git fast-import utility'
. ./test-lib.sh
-. ../diff-lib.sh ;# test-lib chdir's into trash
+. "$TEST_DIRECTORY"/diff-lib.sh ;# test-lib chdir's into trash
file2_data='file2
second line of EOF'
@@ -59,7 +59,7 @@ M 755 :4 file4
INPUT_END
test_expect_success \
'A: create pack from stdin' \
- 'git-fast-import --export-marks=marks.out actual &&
- git diff expect actual'
+ test_cmp expect actual'
cat >expect <actual &&
- git diff expect actual'
+ test_cmp expect actual'
echo "$file2_data" >expect
test_expect_success \
'A: verify file2' \
- 'git cat-file blob master:file2 >actual && git diff expect actual'
+ '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 && git diff expect actual'
+ '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 && git diff expect actual'
+ 'git cat-file blob master:file4 >actual && test_cmp expect actual'
cat >expect <expect <input <input <actual &&
- git diff expect actual'
+ test_cmp expect actual'
cat >expect <expect
test_expect_success \
'D: verify file5' \
'git cat-file blob branch:newdir/interesting >actual &&
- git diff expect actual'
+ test_cmp expect actual'
echo "$file6_data" >expect
test_expect_success \
'D: verify file6' \
'git cat-file blob branch:newdir/exec.sh >actual &&
- git diff expect actual'
+ test_cmp expect actual'
###
### series E
@@ -340,11 +340,11 @@ from refs/heads/branch^0
INPUT_END
test_expect_success 'E: rfc2822 date, --date-format=raw' '
- ! git-fast-import --date-format=raw actual &&
- git diff expect actual'
+ test_cmp expect actual'
###
### series F
@@ -381,7 +381,7 @@ from refs/heads/branch
INPUT_END
test_expect_success \
'F: non-fast-forward update skips' \
- 'if git-fast-import actual &&
- git diff expect actual'
+ test_cmp expect actual'
###
### series G
@@ -431,7 +431,7 @@ from refs/heads/branch~1
INPUT_END
test_expect_success \
'G: non-fast-forward update forced' \
- 'git-fast-import --force expect
test_expect_success \
'H: verify file' \
'git cat-file blob H:h/e/l/lo >actual &&
- git diff expect actual'
+ test_cmp expect actual'
###
### series I
@@ -507,7 +507,7 @@ from refs/heads/branch
INPUT_END
test_expect_success \
'I: export-pack-edges' \
- 'git-fast-import --export-pack-edges=edges.list expect <actual &&
- git diff expect actual'
+ test_cmp expect actual'
###
### series J
@@ -541,7 +541,7 @@ COMMIT
INPUT_END
test_expect_success \
'J: reset existing branch creates empty commit' \
- 'git-fast-import output &&
- git diff expect output'
+ test_cmp expect output'
###
### series M
@@ -649,7 +649,7 @@ cat >expect <actual &&
compare_diff_raw expect actual'
@@ -670,7 +670,7 @@ cat >expect <actual &&
compare_diff_raw expect actual'
@@ -691,7 +691,7 @@ cat >expect <actual &&
compare_diff_raw expect actual'
@@ -717,7 +717,7 @@ cat >expect <actual &&
compare_diff_raw expect actual'
@@ -751,7 +751,7 @@ cat >expect <actual &&
compare_diff_raw expect actual'
@@ -775,8 +775,8 @@ INPUT_END
test_expect_success \
'N: copy dirty subdirectory' \
- 'git-fast-import input <actual &&
- git diff expect actual'
+ test_cmp expect actual'
cat >input <actual &&
+ 'git fast-import actual &&
grep "progress " expect &&
- git diff expect actual'
+ test_cmp expect actual'
+
+###
+### series P (gitlinks)
+###
+
+cat >input < $GIT_COMMITTER_DATE
+data 12
+sub_initial
+M 100644 :1 file
+
+blob
+mark :3
+data < $GIT_COMMITTER_DATE
+data 8
+initial
+from refs/heads/master
+M 100644 :3 .gitmodules
+M 160000 :2 sub
+
+blob
+mark :5
+data 20
+test file
+more data
+
+commit refs/heads/sub
+mark :6
+committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+data 11
+sub_second
+from :2
+M 100644 :5 file
+
+commit refs/heads/subuse1
+mark :7
+committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+data 7
+second
+from :4
+M 160000 :6 sub
+
+INPUT_END
+
+test_expect_success \
+ 'P: supermodule & submodule mix' \
+ 'git fast-import input < $GIT_COMMITTER_DATE
+data 8
+initial
+from refs/heads/master
+M 100644 :1 .gitmodules
+M 160000 $SUBPREV sub
+
+commit refs/heads/subuse2
+mark :3
+committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
+data 7
+second
+from :2
+M 160000 $SUBLAST sub
+
+INPUT_END
+
+test_expect_success \
+ 'P: verbatim SHA gitlinks' \
+ 'git branch -D sub &&
+ git gc && git prune &&
+ git fast-import input < $GIT_COMMITTER_DATE
+data <input < $GIT_COMMITTER_DATE
+data <