]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t9300-fast-import.sh
Merge branch 'bw/format-patch-o-create-leading-dirs'
[thirdparty/git.git] / t / t9300-fast-import.sh
index 0a44a06239192983c412b63d5f940f5ab4581c4f..e707fb861e14ed66b7cc524ab02513eafec74fca 100755 (executable)
@@ -85,6 +85,36 @@ test_expect_success 'A: create pack from stdin' '
        An annotated tag that annotates a blob.
        EOF
 
+       tag to-be-deleted
+       from :3
+       data <<EOF
+       Another annotated tag that annotates a blob.
+       EOF
+
+       reset refs/tags/to-be-deleted
+       from 0000000000000000000000000000000000000000
+
+       tag nested
+       mark :6
+       from :4
+       data <<EOF
+       Tag of our lovely commit
+       EOF
+
+       reset refs/tags/nested
+       from 0000000000000000000000000000000000000000
+
+       tag nested
+       mark :7
+       from :6
+       data <<EOF
+       Tag of tag of our lovely commit
+       EOF
+
+       alias
+       mark :8
+       to :5
+
        INPUT_END
        git fast-import --export-marks=marks.out <input &&
        git whatchanged master
@@ -157,12 +187,19 @@ test_expect_success 'A: verify tag/series-A-blob' '
        test_cmp expect actual
 '
 
+test_expect_success 'A: verify tag deletion is successful' '
+       test_must_fail git rev-parse --verify refs/tags/to-be-deleted
+'
+
 test_expect_success 'A: verify marks output' '
        cat >expect <<-EOF &&
        :2 $(git rev-parse --verify master:file2)
        :3 $(git rev-parse --verify master:file3)
        :4 $(git rev-parse --verify master:file4)
        :5 $(git rev-parse --verify master^0)
+       :6 $(git cat-file tag nested | grep object | cut -d" " -f 2)
+       :7 $(git rev-parse --verify nested)
+       :8 $(git rev-parse --verify master^0)
        EOF
        test_cmp expect marks.out
 '