Code

t3404: Add test case for auto-amending only edited commits after "edit"
[git.git] / t / t9300-fast-import.sh
index 1fc06c5a23b50d54c33755a9fce4ddd9ed3b9c79..8b79de5b6345680bfc0a50f02a0334ddc67186c2 100755 (executable)
@@ -56,6 +56,12 @@ M 644 :2 file2
 M 644 :3 file3
 M 755 :4 file4
 
+tag series-A
+from :5
+data <<EOF
+An annotated tag without a tagger
+EOF
+
 INPUT_END
 test_expect_success \
     'A: create pack from stdin' \
@@ -101,6 +107,18 @@ test_expect_success \
        'A: verify file4' \
        'git cat-file blob master:file4 >actual && test_cmp expect actual'
 
+cat >expect <<EOF
+object $(git rev-parse refs/heads/master)
+type commit
+tag series-A
+
+An annotated tag without a tagger
+EOF
+test_expect_success 'A: verify tag/series-A' '
+       git cat-file tag tags/series-A >actual &&
+       test_cmp expect actual
+'
+
 cat >expect <<EOF
 :2 `git rev-parse --verify master:file2`
 :3 `git rev-parse --verify master:file3`
@@ -983,7 +1001,7 @@ test_expect_success \
         git checkout subuse1 &&
         rm -rf sub && mkdir sub && cd sub &&
         git init &&
-        git fetch .. refs/heads/sub:refs/heads/master &&
+        git fetch --update-head-ok .. refs/heads/sub:refs/heads/master &&
         git checkout master &&
         cd .. &&
         git submodule init &&
@@ -1045,7 +1063,7 @@ DATA
 INPUT_END
 
 test_expect_success 'P: fail on inline gitlink' '
-    ! git-fast-import <input'
+    test_must_fail git-fast-import <input'
 
 test_tick
 cat >input <<INPUT_END
@@ -1068,6 +1086,6 @@ M 160000 :1 sub
 INPUT_END
 
 test_expect_success 'P: fail on blob mark in gitlink' '
-    ! git-fast-import <input'
+    test_must_fail git-fast-import <input'
 
 test_done