]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/t7004-tag: add regression test for successful tag creation
authorKristoffer Haugsbakk <code@khaugsbakk.name>
Tue, 16 May 2023 17:55:45 +0000 (19:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 May 2023 18:38:14 +0000 (11:38 -0700)
The standard tag message file is unlinked if the tag is created.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t7004-tag.sh

index 0fe6ba93a29f996e7f473fe2fa708956a46d059b..13937c36421f0168fe057f53f3edfedd1361fbc7 100755 (executable)
@@ -2188,4 +2188,13 @@ test_expect_success 'Does --[no-]contains stop at commits? Yes!' '
        test_cmp expected actual
 '
 
+test_expect_success 'If tag is created then tag message file is unlinked' '
+       test_when_finished "git tag -d foo" &&
+       write_script fakeeditor <<-\EOF &&
+       echo Message >.git/TAG_EDITMSG
+       EOF
+       GIT_EDITOR=./fakeeditor git tag -a foo &&
+       test_path_is_missing .git/TAG_EDITMSG
+'
+
 test_done