From 0056fdb94201f54fcbb51d741a68b04bf41213fc Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Sat, 15 Mar 2025 19:48:59 -0700 Subject: Move git references checking to gitrepo packages to reduce expose of repository path (#33891) --- modules/git/repo_tag.go | 6 ------ 1 file changed, 6 deletions(-) (limited to 'modules/git') 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}) -- cgit v1.2.3