chore: Remove IsTagExist

- Introduced in 1ebb35b988 and removed in 2af67f6044.
This commit is contained in:
Gusted 2025-01-31 13:50:07 +01:00
parent 6fd9c065dc
commit d2701877c0
No known key found for this signature in database
GPG key ID: FD821B732837125F
2 changed files with 0 additions and 7 deletions

View file

@ -104,7 +104,6 @@ code.gitea.io/gitea/modules/git
CommitChangesWithArgs
SetUpdateHook
openRepositoryWithDefaultContext
IsTagExist
ToEntryMode
code.gitea.io/gitea/modules/gitgraph

View file

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