Skip to content

Commit 5ce40fe

Browse files
authored
Merge branch 'master' into slight-performance-improvement-for-last-commit-cache
2 parents 2cba695 + e7fc078 commit 5ce40fe

File tree

14 files changed

+111
-37
lines changed

14 files changed

+111
-37
lines changed

cmd/admin.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
pwd "code.gitea.io/gitea/modules/password"
2222
repo_module "code.gitea.io/gitea/modules/repository"
2323
"code.gitea.io/gitea/modules/setting"
24+
"code.gitea.io/gitea/modules/storage"
2425

2526
"github.com/urfave/cli"
2627
)
@@ -489,6 +490,10 @@ func runDeleteUser(c *cli.Context) error {
489490
return err
490491
}
491492

493+
if err := storage.Init(); err != nil {
494+
return err
495+
}
496+
492497
var err error
493498
var user *models.User
494499
if c.IsSet("email") {

docs/content/doc/installation/with-docker-rootless.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ services:
8989
server:
9090
image: gitea/gitea:latest-rootless
9191
+ environment:
92-
+ - GITEA__database__TYPE=mysql
92+
+ - GITEA__database__DB_TYPE=mysql
9393
+ - GITEA__database__HOST=db:3306
9494
+ - GITEA__database__NAME=gitea
9595
+ - GITEA__database__USER=gitea
@@ -130,7 +130,7 @@ services:
130130
server:
131131
image: gitea/gitea:latest-rootless
132132
environment:
133-
+ - GITEA__database__TYPE=postgres
133+
+ - GITEA__database__DB_TYPE=postgres
134134
+ - GITEA__database__HOST=db:5432
135135
+ - GITEA__database__NAME=gitea
136136
+ - GITEA__database__USER=gitea

docs/content/doc/installation/with-docker.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ services:
118118
environment:
119119
- USER_UID=1000
120120
- USER_GID=1000
121-
+ - GITEA__database__TYPE=mysql
121+
+ - GITEA__database__DB_TYPE=mysql
122122
+ - GITEA__database__HOST=db:3306
123123
+ - GITEA__database__NAME=gitea
124124
+ - GITEA__database__USER=gitea
@@ -169,7 +169,7 @@ services:
169169
environment:
170170
- USER_UID=1000
171171
- USER_GID=1000
172-
+ - GITEA__database__TYPE=postgres
172+
+ - GITEA__database__DB_TYPE=postgres
173173
+ - GITEA__database__HOST=db:5432
174174
+ - GITEA__database__NAME=gitea
175175
+ - GITEA__database__USER=gitea

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ require (
122122
github.com/unknwon/com v1.0.1
123123
github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44
124124
github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae
125-
github.com/unrolled/render v1.0.3
125+
github.com/unrolled/render v1.1.0
126126
github.com/urfave/cli v1.22.5
127127
github.com/willf/bitset v1.1.11 // indirect
128128
github.com/xanzy/go-gitlab v0.44.0

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,8 @@ github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae h1:ihaXiJkaca54I
11151115
github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae/go.mod h1:1fdkY6xxl6ExVs2QFv7R0F5IRZHKA8RahhB9fMC9RvM=
11161116
github.com/unrolled/render v1.0.3 h1:baO+NG1bZSF2WR4zwh+0bMWauWky7DVrTOfvE2w+aFo=
11171117
github.com/unrolled/render v1.0.3/go.mod h1:gN9T0NhL4Bfbwu8ann7Ry/TGHYfosul+J0obPf6NBdM=
1118+
github.com/unrolled/render v1.1.0 h1:gvpR9hHxTt6DcGqRYuVVFcfd8rtK+nyEPUJN06KB57Q=
1119+
github.com/unrolled/render v1.1.0/go.mod h1:gN9T0NhL4Bfbwu8ann7Ry/TGHYfosul+J0obPf6NBdM=
11181120
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
11191121
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
11201122
github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU=

modules/indexer/stats/db.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ func (db *DBIndexer) Index(id int64) error {
3838
// Get latest commit for default branch
3939
commitID, err := gitRepo.GetBranchCommitID(repo.DefaultBranch)
4040
if err != nil {
41-
log.Error("Unable to get commit ID for defaultbranch %s in %s", repo.DefaultBranch, repo.RepoPath())
41+
if git.IsErrBranchNotExist(err) || git.IsErrNotExist((err)) {
42+
log.Debug("Unable to get commit ID for defaultbranch %s in %s ... skipping this repository", repo.DefaultBranch, repo.RepoPath())
43+
return nil
44+
}
45+
log.Error("Unable to get commit ID for defaultbranch %s in %s. Error: %v", repo.DefaultBranch, repo.RepoPath(), err)
4246
return err
4347
}
4448

vendor/github.com/unrolled/render/.travis.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

vendor/github.com/unrolled/render/README.md

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/unrolled/render/buffer.go

Lines changed: 0 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/unrolled/render/engine.go

Lines changed: 11 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/unrolled/render/genericbufferpool.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/unrolled/render/render.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/unrolled/render/sizedbufferpool.go

Lines changed: 62 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,7 @@ github.com/unknwon/i18n
777777
# github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae
778778
## explicit
779779
github.com/unknwon/paginater
780-
# github.com/unrolled/render v1.0.3
780+
# github.com/unrolled/render v1.1.0
781781
## explicit
782782
github.com/unrolled/render
783783
# github.com/urfave/cli v1.22.5

0 commit comments

Comments
 (0)