X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft9300-fast-import.sh;h=bd5d5af661b19bc1665e52d8859c1077ac6cbd93;hb=1071dd61123aca744caec08413da2985dbdeec93;hp=5edf56f198dc25b9db47ff363fe49958e5299162;hpb=e919cb302e75141c2565106bed2f0b6cb8047570;p=git.git
diff --git a/t/t9300-fast-import.sh b/t/t9300-fast-import.sh
index 5edf56f19..bd5d5af66 100755
--- a/t/t9300-fast-import.sh
+++ b/t/t9300-fast-import.sh
@@ -5,7 +5,7 @@
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'
@@ -166,7 +166,7 @@ M 755 0000000000000000000000000000000000000001 zero1
INPUT_END
test_expect_success 'B: fail on invalid blob sha1' '
- ! git-fast-import expect &&
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 <