mirror of
https://github.com/go-gitea/gitea
synced 2025-09-17 14:18:15 +00:00
Remove the duplicated function GetTags (#35375)
This PR removes the GetTags function from the git module and keeps only GetTagInfos. All previous usages of GetTags have been replaced with database-based tag functions. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -707,12 +707,6 @@ func PrepareCompareDiff(
|
||||
}
|
||||
|
||||
func getBranchesAndTagsForRepo(ctx gocontext.Context, repo *repo_model.Repository) (branches, tags []string, err error) {
|
||||
gitRepo, err := gitrepo.OpenRepository(ctx, repo)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
defer gitRepo.Close()
|
||||
|
||||
branches, err = git_model.FindBranchNames(ctx, git_model.FindBranchOptions{
|
||||
RepoID: repo.ID,
|
||||
ListOptions: db.ListOptionsAll,
|
||||
@@ -721,7 +715,7 @@ func getBranchesAndTagsForRepo(ctx gocontext.Context, repo *repo_model.Repositor
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
tags, err = gitRepo.GetTags(0, 0)
|
||||
tags, err = repo_model.GetTagNamesByRepoID(ctx, repo.ID)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user