Thread (19 messages) 19 messages, 3 authors, 2023-05-17
STALE1131d
Revisions (3)
  1. v1 [diff vs current]
  2. v2 [diff vs current]
  3. v3 current

[PATCH v3 2/3] t/t7004-tag: add regression test for successful tag creation

From: Kristoffer Haugsbakk <hidden>
Date: 2023-05-16 17:57:01
Subsystem: the rest · Maintainer: Linus Torvalds

The standard tag message file is unlinked if the tag is created.

Signed-off-by: Kristoffer Haugsbakk <redacted>
---

Notes (series):
    See: https://lore.kernel.org/git/xmqq353x8de3.fsf@gitster.g/T/#m594378bc6fe2545e638ce2d5f9c11861d4e33082 (local)
    
    > What you want to use is test_path_is_missing, without "!".

 t/t7004-tag.sh | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh
index 9aa1660651b..1cb738b00d2 100755
--- a/t/t7004-tag.sh
+++ b/t/t7004-tag.sh
@@ -2127,4 +2127,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
-- 
2.40.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help