diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2025-03-15 19:48:59 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-15 19:48:59 -0700 |
commit | 0056fdb94201f54fcbb51d741a68b04bf41213fc (patch) | |
tree | 5185b6ad1d8c8560e8cb06cb83a60d6c8fc35620 /modules/git | |
parent | f11ac6bf3cb45e01080b1ec5bd9cbdd1ee5cda92 (diff) | |
download | gitea-0056fdb94201f54fcbb51d741a68b04bf41213fc.tar.gz gitea-0056fdb94201f54fcbb51d741a68b04bf41213fc.zip |
Move git references checking to gitrepo packages to reduce expose of repository path (#33891)
Diffstat (limited to 'modules/git')
-rw-r--r-- | modules/git/repo_tag.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/modules/git/repo_tag.go b/modules/git/repo_tag.go index d653b0e2e6..c74618471a 100644 --- a/modules/git/repo_tag.go +++ b/modules/git/repo_tag.go @@ -5,7 +5,6 @@ package git import ( - "context" "fmt" "io" "strings" @@ -17,11 +16,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("tag").AddDashesAndList(name, revision).RunStdString(repo.Ctx, &RunOpts{Dir: repo.Path}) |