Merge branch 'jk/ident-loosen-getpwuid' into maint
[gitweb.git] / t / t7004-tag.sh
index d1ff5c94f2f3241b3b1ed436d0011280986abab7..d31788cc6ce6a5698c34ffe6ee8a59fccacab90c 100755 (executable)
@@ -51,7 +51,19 @@ test_expect_success 'creating a tag using default HEAD should succeed' '
        echo foo >foo &&
        git add foo &&
        git commit -m Foo &&
-       git tag mytag
+       git tag mytag &&
+       test_must_fail git reflog exists refs/tags/mytag
+'
+
+test_expect_success 'creating a tag with --create-reflog should create reflog' '
+       test_when_finished "git tag -d tag_with_reflog" &&
+       git tag --create-reflog tag_with_reflog &&
+       git reflog exists refs/tags/tag_with_reflog
+'
+
+test_expect_success '--create-reflog does not create reflog on failure' '
+       test_must_fail git tag --create-reflog mytag &&
+       test_must_fail git reflog exists refs/tags/mytag
 '
 
 test_expect_success 'listing all tags if one exists should succeed' '