bug fix release

release/v1.15
Lunny Xiao 2017-01-09 23:51:21 +08:00 committed by Kim "BKC" Carlbäcker
parent b316b2e740
commit 7209917fd7
5 changed files with 14 additions and 9 deletions

View File

@ -71,6 +71,11 @@ func Releases(ctx *context.Context) {
return return
} }
if len(rawTags) == 0 {
ctx.HTML(200, tplReleases)
return
}
if len(rawTags) <= (page-1)*limit { if len(rawTags) <= (page-1)*limit {
ctx.Handle(500, "Releases", errors.New("no more pages")) ctx.Handle(500, "Releases", errors.New("no more pages"))
return return

2
vendor/code.gitea.io/git/Makefile generated vendored
View File

@ -18,7 +18,7 @@ generate:
.PHONY: fmt .PHONY: fmt
fmt: fmt:
go fmt $(PACKAGES) find . -name "*.go" -type f -not -path "./vendor/*" | xargs gofmt -s -w
.PHONY: vet .PHONY: vet
vet: vet:

View File

@ -118,7 +118,7 @@ func parseTag(line string, opt TagOption) (*Tag, error) {
} }
left := strings.TrimSpace(line[25:]) left := strings.TrimSpace(line[25:])
start := strings.Index(left, "(tag: ") start := strings.Index(left, "tag: ")
if start < 0 { if start < 0 {
return nil, nil return nil, nil
} }
@ -127,11 +127,11 @@ func parseTag(line string, opt TagOption) (*Tag, error) {
return nil, nil return nil, nil
} }
end = end + start + 1 end = end + start + 1
part := strings.IndexByte(left[start+6:end], ',') part := strings.IndexByte(left[start+5:end], ',')
if part > 0 { if part > 0 {
tag.Name = strings.TrimSpace(left[start+6 : start+6+part]) tag.Name = strings.TrimSpace(left[start+5 : start+5+part])
} else { } else {
tag.Name = strings.TrimSpace(left[start+6 : end]) tag.Name = strings.TrimSpace(left[start+5 : end])
} }
next := strings.IndexByte(left[end+2:], ' ') next := strings.IndexByte(left[end+2:], ' ')
if next < 0 { if next < 0 {

View File

@ -162,7 +162,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string) ([][]interfac
// GetCommitsInfoWithCustomConcurrency takes advantages of concurrency to speed up getting information // GetCommitsInfoWithCustomConcurrency takes advantages of concurrency to speed up getting information
// of all commits that are corresponding to these entries. If the given maxConcurrency is negative or // of all commits that are corresponding to these entries. If the given maxConcurrency is negative or
// equal to zero: the right number of goroutine (concurrency) to use will be choosen related of the // equal to zero: the right number of goroutine (concurrency) to use will be chosen related of the
// host CPU. // host CPU.
func (tes Entries) GetCommitsInfoWithCustomConcurrency(commit *Commit, treePath string, maxConcurrency int) ([][]interface{}, error) { func (tes Entries) GetCommitsInfoWithCustomConcurrency(commit *Commit, treePath string, maxConcurrency int) ([][]interface{}, error) {
if len(tes) == 0 { if len(tes) == 0 {

6
vendor/vendor.json vendored
View File

@ -3,10 +3,10 @@
"ignore": "test", "ignore": "test",
"package": [ "package": [
{ {
"checksumSHA1": "zK/6EifSPy/O5Vbx7CMWfnLHExI=", "checksumSHA1": "P2wIRW07gnEgqLZAcg7bz+Jw9Oc=",
"path": "code.gitea.io/git", "path": "code.gitea.io/git",
"revision": "a3ee12b97af51eec1b7aa0525f6a39c97520817d", "revision": "7477742b3c79d36d099baaf614864b6bbdfdecca",
"revisionTime": "2017-01-05T02:48:44Z" "revisionTime": "2017-01-09T15:46:57Z"
}, },
{ {
"checksumSHA1": "BKj0haFTDebzdC2nACpoGzp3s8A=", "checksumSHA1": "BKj0haFTDebzdC2nACpoGzp3s8A=",