mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Add skip and limit to git.GetTags (#16897)
* Make GetTags() api similar to GetBranches() * Use it for Tag/Release page
This commit is contained in:
parent
9ca0e7905c
commit
77f604a928
6 changed files with 33 additions and 20 deletions
|
@ -606,7 +606,7 @@ func getBranchesAndTagsForRepo(user *models.User, repo *models.Repository) (bool
|
|||
if err != nil {
|
||||
return false, nil, nil, err
|
||||
}
|
||||
tags, err := gitRepo.GetTags()
|
||||
tags, err := gitRepo.GetTags(0, 0)
|
||||
if err != nil {
|
||||
return false, nil, nil, err
|
||||
}
|
||||
|
@ -632,7 +632,7 @@ func CompareDiff(ctx *context.Context) {
|
|||
}
|
||||
|
||||
baseGitRepo := ctx.Repo.GitRepo
|
||||
baseTags, err := baseGitRepo.GetTags()
|
||||
baseTags, err := baseGitRepo.GetTags(0, 0)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetTags", err)
|
||||
return
|
||||
|
@ -646,7 +646,7 @@ func CompareDiff(ctx *context.Context) {
|
|||
}
|
||||
ctx.Data["HeadBranches"] = headBranches
|
||||
|
||||
headTags, err := headGitRepo.GetTags()
|
||||
headTags, err := headGitRepo.GetTags(0, 0)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetTags", err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue