Signed-off-by: Kristoffer Haugsbakk <code@xxxxxxxxxxxxxxx> --- t/t7004-tag.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 550b5b1cce..1e512dbe06 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -2136,4 +2136,14 @@ test_expect_success 'If tag is created then tag message file is unlinked' ' ! test -e .git/TAG_EDITMSG ' +test_expect_success 'If tag cannot be created then tag message file is not unlinked' ' + test_when_finished "git tag -d foo/bar" && + write_script fakeeditor <<-\EOF && + echo Message >.git/TAG_EDITMSG + EOF + git tag foo/bar && + ! GIT_EDITOR=./fakeeditor git tag -a foo && + test -e .git/TAG_EDITMSG +' + test_done -- 2.40.1