From 451aef7a1c177b58c4519239a65dbfbab32b4888 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 10 Mar 2017 14:12:46 -0500 Subject: release: improve page load performance Previously, we load all releases of a repository which could hurt performance when the repository has a lot of releases. Now we're able to only load releases in current page view we need to show by matching with 'tag_name'. --- vendor/github.com/gogits/git-module/git.go | 2 +- vendor/github.com/gogits/git-module/repo_tag.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/gogits/git-module') diff --git a/vendor/github.com/gogits/git-module/git.go b/vendor/github.com/gogits/git-module/git.go index fc834196..3eef5db5 100644 --- a/vendor/github.com/gogits/git-module/git.go +++ b/vendor/github.com/gogits/git-module/git.go @@ -10,7 +10,7 @@ import ( "time" ) -const _VERSION = "0.4.12" +const _VERSION = "0.4.13" func Version() string { return _VERSION diff --git a/vendor/github.com/gogits/git-module/repo_tag.go b/vendor/github.com/gogits/git-module/repo_tag.go index b7e96bdb..4cef496b 100644 --- a/vendor/github.com/gogits/git-module/repo_tag.go +++ b/vendor/github.com/gogits/git-module/repo_tag.go @@ -171,7 +171,7 @@ func (repo *Repository) GetTagsAfter(after string, limit int) (*TagsResult, erro } if allTags[i] == after { hasMatch = true - if limit > 0 && i-limit > 0 { + if limit > 0 && i-limit >= 0 { previousAfter = allTags[i-limit] } continue -- cgit v1.2.3