summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-04-03 09:24:51 -0700
committerJunio C Hamano <gitster@pobox.com>2013-04-03 09:24:51 -0700
commit9e72a566995ae84862a341e3a149a4bcaf96385d (patch)
treef53c9a3aace2761495734789299c447f2d04f227 /t
parentfa0a6a48233d9dd1e72ef3fe13166871a18d7714 (diff)
parent3ae851e6fbb4e99fa7281d18a5c6f95a3fb6d998 (diff)
downloadgit-9e72a566995ae84862a341e3a149a4bcaf96385d.tar.gz
Merge branch 'ph/tag-force-no-warn-on-creation' into maint
"git tag -f <tag>" always said "Updated tag '<tag>'" even when creating a new tag (i.e. not overwriting nor updating). * ph/tag-force-no-warn-on-creation: tag: --force does not have to warn when creating tags
Diffstat (limited to 't')
-rwxr-xr-xt/t7004-tag.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index f5a79b13ae..c8d6e9f88c 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -104,6 +104,18 @@ test_expect_success 'creating a tag using HEAD directly should succeed' '
tag_exists myhead
'
+test_expect_success '--force can create a tag with the name of one existing' '
+ tag_exists mytag &&
+ git tag --force mytag &&
+ tag_exists mytag'
+
+test_expect_success '--force is moot with a non-existing tag name' '
+ git tag newtag >expect &&
+ git tag --force forcetag >actual &&
+ test_cmp expect actual
+'
+git tag -d newtag forcetag
+
# deleting tags:
test_expect_success 'trying to delete an unknown tag should fail' '