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})