From e7ca56475d5f9f037d559526888a1ad244058b35 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Fri, 25 Apr 2014 15:50:00 +0200 Subject: [PATCH] Fixed issue #2177: The tag with message can not be deleted Signed-off-by: Sven Strickroth --- src/Git/Git.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Git/Git.cpp b/src/Git/Git.cpp index 0941779ff..94fa9805e 100644 --- a/src/Git/Git.cpp +++ b/src/Git/Git.cpp @@ -2959,8 +2959,14 @@ int CGit::DeleteRef(const CString& reference) if (git_repository_open(&repo, CUnicodeUtils::GetUTF8(CTGitPath(m_CurrentDir).GetGitPathString()))) return -1; + CStringA refA; + if (reference.Right(3) == _T("^{}")) + refA = CUnicodeUtils::GetUTF8(reference.Left(reference.GetLength() - 3)); + else + refA = CUnicodeUtils::GetUTF8(reference); + git_reference *ref = nullptr; - if (git_reference_lookup(&ref, repo, CUnicodeUtils::GetUTF8(reference))) + if (git_reference_lookup(&ref, repo, refA)) { git_repository_free(repo); return -1; -- 2.11.4.GIT