Skip to content

Commit 3d51f1b

Browse files
committed
Merge branch 'frontend-refactor' of github.com:wxiaoguang/gitea into frontend-refactor
2 parents f1eb378 + f27d1a8 commit 3d51f1b

File tree

47 files changed

+2808
-161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2808
-161
lines changed

custom/conf/app.example.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,8 @@ PATH =
580580
;;
581581
;; (Go-Git only) Don't cache objects greater than this in memory. (Set to 0 to disable.)
582582
;LARGE_OBJECT_THRESHOLD = 1048576
583+
;; Set to true to forcibly set core.protectNTFS=false
584+
;DISABLE_CORE_PROTECT_NTFS=false
583585

584586
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
585587
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,7 @@ NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take ef
842842
- `VERBOSE_PUSH`: **true**: Print status information about pushes as they are being processed.
843843
- `VERBOSE_PUSH_DELAY`: **5s**: Only print verbose information if push takes longer than this delay.
844844
- `LARGE_OBJECT_THRESHOLD`: **1048576**: (Go-Git only), don't cache objects greater than this in memory. (Set to 0 to disable.)
845+
- `DISABLE_CORE_PROTECT_NTFS`: **false** Set to true to forcibly set `core.protectNTFS` to false.
845846
## Git - Timeout settings (`git.timeout`)
846847
- `DEFAUlT`: **360**: Git operations default timeout seconds.
847848
- `MIGRATE`: **600**: Migrate external repositories timeout seconds.

go.mod

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ require (
66
cloud.google.com/go v0.78.0 // indirect
77
code.gitea.io/gitea-vet v0.2.1
88
code.gitea.io/sdk/gitea v0.14.0
9-
gitea.com/go-chi/binding v0.0.0-20210301195521-1fe1c9a555e7
10-
gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e
11-
gitea.com/go-chi/captcha v0.0.0-20210110083842-e7696c336a1e
12-
gitea.com/go-chi/session v0.0.0-20210913064732-2ac132b0fa07
9+
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be
10+
gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1
11+
gitea.com/go-chi/captcha v0.0.0-20211013065431-70641c1a35d5
12+
gitea.com/go-chi/session v0.0.0-20211013065435-7d334f340c09
1313
gitea.com/lunny/levelqueue v0.4.1
1414
github.com/Microsoft/go-winio v0.5.0 // indirect
1515
github.com/NYTimes/gziphandler v1.1.1
@@ -37,6 +37,7 @@ require (
3737
github.com/gliderlabs/ssh v0.3.3
3838
github.com/go-asn1-ber/asn1-ber v1.5.3 // indirect
3939
github.com/go-chi/chi v1.5.4
40+
github.com/go-chi/chi/v5 v5.0.4
4041
github.com/go-chi/cors v1.2.0
4142
github.com/go-enry/go-enry/v2 v2.7.1
4243
github.com/go-git/go-billy/v5 v5.3.1

go.sum

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ code.gitea.io/gitea-vet v0.2.1/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFj
4141
code.gitea.io/sdk/gitea v0.14.0 h1:m4J352I3p9+bmJUfS+g0odeQzBY/5OXP91Gv6D4fnJ0=
4242
code.gitea.io/sdk/gitea v0.14.0/go.mod h1:89WiyOX1KEcvjP66sRHdu0RafojGo60bT9UqW17VbWs=
4343
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
44-
gitea.com/go-chi/binding v0.0.0-20210301195521-1fe1c9a555e7 h1:xCVJPY823C8RWpgMabTw2kOglDrg0iS3GcQU6wdwHkU=
45-
gitea.com/go-chi/binding v0.0.0-20210301195521-1fe1c9a555e7/go.mod h1:AyfTrwtfYN54R/HmVvMYPnSTenH5bVoyh8x6tBluxEA=
46-
gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e h1:zgPGaf3kXP0cVm9J0l8ZA2+XDzILYATg0CXbihR6N+o=
44+
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be h1:IzSwPVzd2hE6e67ujY8ReBCrQ5IFNd0uiBmC7Ux5IaY=
45+
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be/go.mod h1:/vR0YjlusOYvosKYW7QKcSnrY0nPLe4RQ/DGi3+i/Do=
4746
gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0=
48-
gitea.com/go-chi/captcha v0.0.0-20210110083842-e7696c336a1e h1:YjaQU6XFicdhPN+MlGolcXO8seYY2+EY5g7vZPB17CQ=
49-
gitea.com/go-chi/captcha v0.0.0-20210110083842-e7696c336a1e/go.mod h1:nfA7JaGv3hbGQ1ktdhAsZhdS84qKffI8NMlHr+Opsog=
50-
gitea.com/go-chi/session v0.0.0-20210913064732-2ac132b0fa07 h1:1xF0xbIgDWnBB0iURAUFCoac4KfhGDdI7y7+3/8I8i4=
51-
gitea.com/go-chi/session v0.0.0-20210913064732-2ac132b0fa07/go.mod h1:Ozg8IchVNb/Udg+ui39iHRYqVHSvf3C99ixdpLR8Vu0=
47+
gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1 h1:Z7DcvTkxt8ovcENgPsQ7xzrGNSQmmIjGS9fJEb1l8jk=
48+
gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0=
49+
gitea.com/go-chi/captcha v0.0.0-20211013065431-70641c1a35d5 h1:J/1i8u40TbcLP/w2w2KCkgW2PelIqYkD5UOwu8IOvVU=
50+
gitea.com/go-chi/captcha v0.0.0-20211013065431-70641c1a35d5/go.mod h1:hQ9SYHKdOX968wJglb/NMQ+UqpOKwW4L+EYdvkWjHSo=
51+
gitea.com/go-chi/session v0.0.0-20211013065435-7d334f340c09 h1:1+K+6uOXrnSfLHXvu8jpuoNEWA3/NULOlLSRZwaij+c=
52+
gitea.com/go-chi/session v0.0.0-20211013065435-7d334f340c09/go.mod h1:fc/pjt5EqNKgqQXYzcas1Z5L5whkZHyOvTA7OzWVJck=
5253
gitea.com/lunny/levelqueue v0.4.1 h1:RZ+AFx5gBsZuyqCvofhAkPQ9uaVDPJnsULoJZIYaJNw=
5354
gitea.com/lunny/levelqueue v0.4.1/go.mod h1:HBqmLbz56JWpfEGG0prskAV97ATNRoj5LDmPicD22hU=
5455
gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s=
@@ -320,11 +321,11 @@ github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1T
320321
github.com/go-asn1-ber/asn1-ber v1.5.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
321322
github.com/go-asn1-ber/asn1-ber v1.5.3 h1:u7utq56RUFiynqUzgVMFDymapcOtQ/MZkh3H4QYkxag=
322323
github.com/go-asn1-ber/asn1-ber v1.5.3/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
323-
github.com/go-chi/chi v1.5.1/go.mod h1:REp24E+25iKvxgeTfHmdUoL5x15kBiDBlnIl5bCwe2k=
324324
github.com/go-chi/chi v1.5.4 h1:QHdzF2szwjqVV4wmByUnTcsbIg7UGaQ0tPF2t5GcAIs=
325325
github.com/go-chi/chi v1.5.4/go.mod h1:uaf8YgoFazUOkPBG7fxPftUylNumIev9awIWOENIuEg=
326-
github.com/go-chi/chi/v5 v5.0.1 h1:ALxjCrTf1aflOlkhMnCUP86MubbWFrzB3gkRPReLpTo=
327326
github.com/go-chi/chi/v5 v5.0.1/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
327+
github.com/go-chi/chi/v5 v5.0.4 h1:5e494iHzsYBiyXQAHHuI4tyJS9M3V84OuX3ufIIGHFo=
328+
github.com/go-chi/chi/v5 v5.0.4/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
328329
github.com/go-chi/cors v1.2.0 h1:tV1g1XENQ8ku4Bq3K9ub2AtgG+p16SmzeMSGTwrOKdE=
329330
github.com/go-chi/cors v1.2.0/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
330331
github.com/go-enry/go-enry/v2 v2.7.1 h1:WCqtfyteIz61GYk9lRVy8HblvIv4cP9GIiwm/6txCbU=
@@ -491,6 +492,7 @@ github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/V
491492
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
492493
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
493494
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
495+
github.com/goccy/go-json v0.4.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
494496
github.com/goccy/go-json v0.7.4 h1:B44qRUFwz/vxPKPISQ1KhvzRi9kZ28RAf6YtjriBZ5k=
495497
github.com/goccy/go-json v0.7.4/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
496498
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=

models/db/context.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ type Context struct {
3131
e Engine
3232
}
3333

34+
// WithEngine returns a db.Context from a context.Context and db.Engine
35+
func WithEngine(ctx context.Context, e Engine) *Context {
36+
return &Context{
37+
Context: ctx,
38+
e: e,
39+
}
40+
}
41+
3442
// Engine returns db engine
3543
func (ctx *Context) Engine() Engine {
3644
return ctx.e

models/repo.go

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,16 +1146,6 @@ func CreateRepository(ctx context.Context, doer, u *User, repo *Repository, over
11461146
return fmt.Errorf("recalculateAccesses: %v", err)
11471147
}
11481148

1149-
if u.Visibility == api.VisibleTypePublic && !repo.IsPrivate {
1150-
// Create/Remove git-daemon-export-ok for git-daemon...
1151-
daemonExportFile := path.Join(repo.RepoPath(), `git-daemon-export-ok`)
1152-
if f, err := os.Create(daemonExportFile); err != nil {
1153-
log.Error("Failed to create %s: %v", daemonExportFile, err)
1154-
} else {
1155-
f.Close()
1156-
}
1157-
}
1158-
11591149
if setting.Service.AutoWatchNewRepos {
11601150
if err = watchRepo(db.GetEngine(ctx), doer.ID, repo.ID, true); err != nil {
11611151
return fmt.Errorf("watchRepo: %v", err)
@@ -1169,6 +1159,38 @@ func CreateRepository(ctx context.Context, doer, u *User, repo *Repository, over
11691159
return nil
11701160
}
11711161

1162+
// CheckDaemonExportOK creates/removes git-daemon-export-ok for git-daemon...
1163+
func (repo *Repository) CheckDaemonExportOK(ctx context.Context) error {
1164+
e := db.GetEngine(ctx)
1165+
if err := repo.getOwner(e); err != nil {
1166+
return err
1167+
}
1168+
1169+
// Create/Remove git-daemon-export-ok for git-daemon...
1170+
daemonExportFile := path.Join(repo.RepoPath(), `git-daemon-export-ok`)
1171+
1172+
isExist, err := util.IsExist(daemonExportFile)
1173+
if err != nil {
1174+
log.Error("Unable to check if %s exists. Error: %v", daemonExportFile, err)
1175+
return err
1176+
}
1177+
1178+
isPublic := !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePublic
1179+
if !isPublic && isExist {
1180+
if err = util.Remove(daemonExportFile); err != nil {
1181+
log.Error("Failed to remove %s: %v", daemonExportFile, err)
1182+
}
1183+
} else if isPublic && !isExist {
1184+
if f, err := os.Create(daemonExportFile); err != nil {
1185+
log.Error("Failed to create %s: %v", daemonExportFile, err)
1186+
} else {
1187+
f.Close()
1188+
}
1189+
}
1190+
1191+
return nil
1192+
}
1193+
11721194
func countRepositories(userID int64, private bool) int64 {
11731195
sess := db.GetEngine(db.DefaultContext).Where("id > 0")
11741196

@@ -1318,24 +1340,9 @@ func updateRepository(e db.Engine, repo *Repository, visibilityChanged bool) (er
13181340
}
13191341

13201342
// Create/Remove git-daemon-export-ok for git-daemon...
1321-
daemonExportFile := path.Join(repo.RepoPath(), `git-daemon-export-ok`)
1322-
isExist, err := util.IsExist(daemonExportFile)
1323-
isPublic := !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePublic
1324-
if err != nil {
1325-
log.Error("Unable to check if %s exists. Error: %v", daemonExportFile, err)
1343+
if err := repo.CheckDaemonExportOK(db.WithEngine(db.DefaultContext, e)); err != nil {
13261344
return err
13271345
}
1328-
if !isPublic && isExist {
1329-
if err = util.Remove(daemonExportFile); err != nil {
1330-
log.Error("Failed to remove %s: %v", daemonExportFile, err)
1331-
}
1332-
} else if isPublic && !isExist {
1333-
if f, err := os.Create(daemonExportFile); err != nil {
1334-
log.Error("Failed to create %s: %v", daemonExportFile, err)
1335-
} else {
1336-
f.Close()
1337-
}
1338-
}
13391346

13401347
forkRepos, err := getRepositoriesByForkID(e, repo.ID)
13411348
if err != nil {

modules/context/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333

3434
"gitea.com/go-chi/cache"
3535
"gitea.com/go-chi/session"
36-
"github.com/go-chi/chi"
36+
chi "github.com/go-chi/chi/v5"
3737
"github.com/unknwon/com"
3838
"github.com/unknwon/i18n"
3939
"github.com/unrolled/render"

modules/git/git.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,12 @@ func Init(ctx context.Context) error {
204204
return err
205205
}
206206
}
207+
if setting.Git.DisableCoreProtectNTFS {
208+
if err := checkAndSetConfig("core.protectntfs", "false", true); err != nil {
209+
return err
210+
}
211+
GlobalCommandArgs = append(GlobalCommandArgs, "-c", "core.protectntfs=false")
212+
}
207213
return nil
208214
}
209215

modules/repository/adopt.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ func AdoptRepository(doer, u *models.User, opts models.CreateRepoOptions) (*mode
6868
if err := adoptRepository(ctx, repoPath, doer, repo, opts); err != nil {
6969
return fmt.Errorf("createDelegateHooks: %v", err)
7070
}
71+
if err := repo.CheckDaemonExportOK(ctx); err != nil {
72+
return fmt.Errorf("checkDaemonExportOK: %v", err)
73+
}
7174

7275
// Initialize Issue Labels if selected
7376
if len(opts.IssueLabels) > 0 {

modules/repository/create.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,11 @@ func CreateRepository(doer, u *models.User, opts models.CreateRepoOptions) (*mod
105105
}
106106
}
107107

108-
if stdout, err := git.NewCommand("update-server-info").
108+
if err := repo.CheckDaemonExportOK(ctx); err != nil {
109+
return fmt.Errorf("checkDaemonExportOK: %v", err)
110+
}
111+
112+
if stdout, err := git.NewCommandContext(ctx, "update-server-info").
109113
SetDescription(fmt.Sprintf("CreateRepository(git update-server-info): %s", repoPath)).
110114
RunInDir(repoPath); err != nil {
111115
log.Error("CreateRepository(git update-server-info) in %v: Stdout: %s\nError: %v", repo, stdout, err)

modules/repository/fork.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,19 @@ func ForkRepository(doer, owner *models.User, opts models.ForkRepoOptions) (_ *m
9797
needsRollback = true
9898

9999
repoPath := models.RepoPath(owner.Name, repo.Name)
100-
if stdout, err := git.NewCommand(
100+
if stdout, err := git.NewCommandContext(ctx,
101101
"clone", "--bare", oldRepoPath, repoPath).
102102
SetDescription(fmt.Sprintf("ForkRepository(git clone): %s to %s", opts.BaseRepo.FullName(), repo.FullName())).
103103
RunInDirTimeout(10*time.Minute, ""); err != nil {
104104
log.Error("Fork Repository (git clone) Failed for %v (from %v):\nStdout: %s\nError: %v", repo, opts.BaseRepo, stdout, err)
105105
return fmt.Errorf("git clone: %v", err)
106106
}
107107

108-
if stdout, err := git.NewCommand("update-server-info").
108+
if err := repo.CheckDaemonExportOK(ctx); err != nil {
109+
return fmt.Errorf("checkDaemonExportOK: %v", err)
110+
}
111+
112+
if stdout, err := git.NewCommandContext(ctx, "update-server-info").
109113
SetDescription(fmt.Sprintf("ForkRepository(git update-server-info): %s", repo.FullName())).
110114
RunInDir(repoPath); err != nil {
111115
log.Error("Fork Repository (git update-server-info) failed for %v:\nStdout: %s\nError: %v", repo, stdout, err)

modules/repository/generate.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,5 +275,16 @@ func GenerateRepository(ctx context.Context, doer, owner *models.User, templateR
275275
return generateRepo, err
276276
}
277277

278+
if err = generateRepo.CheckDaemonExportOK(ctx); err != nil {
279+
return generateRepo, fmt.Errorf("checkDaemonExportOK: %v", err)
280+
}
281+
282+
if stdout, err := git.NewCommandContext(ctx, "update-server-info").
283+
SetDescription(fmt.Sprintf("GenerateRepository(git update-server-info): %s", repoPath)).
284+
RunInDir(repoPath); err != nil {
285+
log.Error("GenerateRepository(git update-server-info) in %v: Stdout: %s\nError: %v", generateRepo, stdout, err)
286+
return generateRepo, fmt.Errorf("error in GenerateRepository(git update-server-info): %v", err)
287+
}
288+
278289
return generateRepo, nil
279290
}

modules/repository/repo.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,21 @@ func MigrateRepositoryGitData(ctx context.Context, u *models.User, repo *models.
9696
}
9797
}
9898

99+
if repo.OwnerID == u.ID {
100+
repo.Owner = u
101+
}
102+
103+
if err = repo.CheckDaemonExportOK(ctx); err != nil {
104+
return repo, fmt.Errorf("checkDaemonExportOK: %v", err)
105+
}
106+
107+
if stdout, err := git.NewCommandContext(ctx, "update-server-info").
108+
SetDescription(fmt.Sprintf("MigrateRepositoryGitData(git update-server-info): %s", repoPath)).
109+
RunInDir(repoPath); err != nil {
110+
log.Error("MigrateRepositoryGitData(git update-server-info) in %v: Stdout: %s\nError: %v", repo, stdout, err)
111+
return repo, fmt.Errorf("error in MigrateRepositoryGitData(git update-server-info): %v", err)
112+
}
113+
99114
gitRepo, err := git.OpenRepository(repoPath)
100115
if err != nil {
101116
return repo, fmt.Errorf("OpenRepository: %v", err)

modules/setting/git.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ var (
2626
EnableAutoGitWireProtocol bool
2727
PullRequestPushMessage bool
2828
LargeObjectThreshold int64
29+
DisableCoreProtectNTFS bool
2930
Timeout struct {
3031
Default int
3132
Migrate int

modules/test/context_tests.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"code.gitea.io/gitea/modules/git"
2020
"code.gitea.io/gitea/modules/web/middleware"
2121

22-
"github.com/go-chi/chi"
22+
chi "github.com/go-chi/chi/v5"
2323
"github.com/stretchr/testify/assert"
2424
"github.com/unrolled/render"
2525
)

modules/validation/binding_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"testing"
1111

1212
"gitea.com/go-chi/binding"
13-
"github.com/go-chi/chi"
13+
chi "github.com/go-chi/chi/v5"
1414
"github.com/stretchr/testify/assert"
1515
)
1616

modules/web/route.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
"code.gitea.io/gitea/modules/web/middleware"
1616

1717
"gitea.com/go-chi/binding"
18-
"github.com/go-chi/chi"
18+
chi "github.com/go-chi/chi/v5"
1919
)
2020

2121
// Wrap converts all kinds of routes to standard library one

modules/web/route_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"net/http/httptest"
1111
"testing"
1212

13-
"github.com/go-chi/chi"
13+
chi "github.com/go-chi/chi/v5"
1414
"github.com/stretchr/testify/assert"
1515
)
1616

options/locale/locale_ja-JP.ini

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,12 @@ issues.review.un_resolve_conversation=未解決にする
13771377
issues.review.resolved_by=がこの会話を解決済みにしました
13781378
issues.assignee.error=予期しないエラーにより、一部の担当者を追加できませんでした。
13791379
issues.reference_issue.body=内容
1380+
issues.content_history.deleted=削除しました
1381+
issues.content_history.edited=編集済み
1382+
issues.content_history.created=作成済み
1383+
issues.content_history.delete_from_history=履歴から削除
1384+
issues.content_history.delete_from_history_confirm=履歴から削除しますか?
1385+
issues.content_history.options=オプション
13801386

13811387
compare.compare_base=基準
13821388
compare.compare_head=比較
@@ -1985,6 +1991,12 @@ settings.lfs_pointers.inRepo=Repo内
19851991
settings.lfs_pointers.exists=実ファイルあり
19861992
settings.lfs_pointers.accessible=アクセス可
19871993
settings.lfs_pointers.associateAccessible=アクセス可能な%d件のOIDを登録
1994+
settings.rename_branch_failed_exist=ターゲットブランチ %s が存在するため、ブランチの名前を変更できません。
1995+
settings.rename_branch_failed_not_exist=ブランチが存在しないので、ブランチ %s の名前を変更できません。
1996+
settings.rename_branch_success=ブランチ %s の名前を %s に変更しました。
1997+
settings.rename_branch_from=以前のブランチ名
1998+
settings.rename_branch_to=新しいブランチ名
1999+
settings.rename_branch=ブランチ名を変更
19882000

19892001
diff.browse_source=ソースを参照
19902002
diff.parent=親
@@ -2106,6 +2118,7 @@ branch.create_new_branch=このブランチをもとに作成します:
21062118
branch.confirm_create_branch=ブランチを作成
21072119
branch.new_branch=新しいブランチの作成
21082120
branch.new_branch_from='%s' から新しいブランチを作成
2121+
branch.renamed=ブランチ %s は %s にリネームされました。
21092122

21102123
tag.create_tag=タグ <strong>%s</strong> を作成
21112124
tag.create_success=タグ '%s' が作成されました。
@@ -2358,6 +2371,18 @@ users.still_own_repo=このユーザーはまだ1つ以上のリポジトリを
23582371
users.still_has_org=このユーザーは組織のメンバーになっています。 先に組織からこのユーザーを削除してください。
23592372
users.deletion_success=ユーザーアカウントを削除しました。
23602373
users.reset_2fa=2要素認証をリセット
2374+
users.list_status_filter.menu_text=フィルター
2375+
users.list_status_filter.reset=リセット
2376+
users.list_status_filter.is_active=有効
2377+
users.list_status_filter.not_active=無効
2378+
users.list_status_filter.is_admin=管理者
2379+
users.list_status_filter.not_admin=非管理者
2380+
users.list_status_filter.is_restricted=制限あり
2381+
users.list_status_filter.not_restricted=制限なし
2382+
users.list_status_filter.is_prohibit_login=ログインを禁止
2383+
users.list_status_filter.not_prohibit_login=ログインを許可
2384+
users.list_status_filter.is_2fa_enabled=2要素認証有効
2385+
users.list_status_filter.not_2fa_enabled=2要素認証無効
23612386

23622387
emails.email_manage_panel=ユーザーメールアドレスの管理
23632388
emails.primary=プライマリー

services/forms/user_form.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (f *InstallForm) Validate(req *http.Request, errs binding.Errors) binding.E
8585
// RegisterForm form for registering
8686
type RegisterForm struct {
8787
UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"`
88-
Email string `binding:"Required;Email;MaxSize(254)"`
88+
Email string `binding:"Required;MaxSize(254)"`
8989
Password string `binding:"MaxSize(255)"`
9090
Retype string
9191
GRecaptchaResponse string `form:"g-recaptcha-response"`

0 commit comments

Comments
 (0)