From d2701877c0e58ecf5b2b98ad53461826d30d75c6 Mon Sep 17 00:00:00 2001 From: Gusted Date: Fri, 31 Jan 2025 13:50:07 +0100 Subject: [PATCH] chore: Remove `IsTagExist` - Introduced in 1ebb35b98889ff77299f24d82da426b434b0cca0 and removed in 2af67f6044af1cad7136ce8c123e37ab090ca9bc. --- .deadcode-out | 1 - modules/git/repo_tag.go | 6 ------ 2 files changed, 7 deletions(-) diff --git a/.deadcode-out b/.deadcode-out index 7f3e77017a..e4f832d13d 100644 --- a/.deadcode-out +++ b/.deadcode-out @@ -104,7 +104,6 @@ code.gitea.io/gitea/modules/git CommitChangesWithArgs SetUpdateHook openRepositoryWithDefaultContext - IsTagExist ToEntryMode code.gitea.io/gitea/modules/gitgraph diff --git a/modules/git/repo_tag.go b/modules/git/repo_tag.go index 3b48b1fb9b..4466d8e5c0 100644 --- a/modules/git/repo_tag.go +++ b/modules/git/repo_tag.go @@ -5,7 +5,6 @@ package git import ( - "context" "errors" "fmt" "io" @@ -20,11 +19,6 @@ import ( // TagPrefix tags prefix path on the repository const TagPrefix = "refs/tags/" -// IsTagExist returns true if given tag exists in the repository. -func IsTagExist(ctx context.Context, repoPath, name string) bool { - return IsReferenceExist(ctx, repoPath, TagPrefix+name) -} - // CreateTag create one tag in the repository func (repo *Repository) CreateTag(name, revision string) error { _, _, err := NewCommand(repo.Ctx, "tag").AddDashesAndList(name, revision).RunStdString(&RunOpts{Dir: repo.Path})