Skip to content

Commit be1a4bb

Browse files
author
Gusted
authored
Merge branch 'main' into fix-bom-escape
2 parents 489ff43 + 6d55a13 commit be1a4bb

File tree

7 files changed

+12
-14
lines changed

7 files changed

+12
-14
lines changed

custom/conf/app.example.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ PATH =
11151115
;SEARCH_REPO_DESCRIPTION = true
11161116
;;
11171117
;; Whether to enable a Service Worker to cache frontend assets
1118-
;USE_SERVICE_WORKER = true
1118+
;USE_SERVICE_WORKER = false
11191119

11201120
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11211121
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
189189
add it to this config.
190190
- `DEFAULT_SHOW_FULL_NAME`: **false**: Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used.
191191
- `SEARCH_REPO_DESCRIPTION`: **true**: Whether to search within description at repository search on explore page.
192-
- `USE_SERVICE_WORKER`: **true**: Whether to enable a Service Worker to cache frontend assets.
192+
- `USE_SERVICE_WORKER`: **false**: Whether to enable a Service Worker to cache frontend assets.
193193

194194
### UI - Admin (`ui.admin`)
195195

docs/content/doc/developers/hacking-on-gitea.en-us.md

-2
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ Before committing, make sure the linters pass:
185185
make lint-frontend
186186
```
187187

188-
Note: When working on frontend code, set `USE_SERVICE_WORKER` to `false` in `app.ini` to prevent undesirable caching of frontend assets.
189-
190188
### Configuring local ElasticSearch instance
191189

192190
Start local ElasticSearch instance using docker:

modules/setting/setting.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ func loadFromConf(allowEmpty bool, extraConfig string) {
10421042
UI.ShowUserEmail = Cfg.Section("ui").Key("SHOW_USER_EMAIL").MustBool(true)
10431043
UI.DefaultShowFullName = Cfg.Section("ui").Key("DEFAULT_SHOW_FULL_NAME").MustBool(false)
10441044
UI.SearchRepoDescription = Cfg.Section("ui").Key("SEARCH_REPO_DESCRIPTION").MustBool(true)
1045-
UI.UseServiceWorker = Cfg.Section("ui").Key("USE_SERVICE_WORKER").MustBool(true)
1045+
UI.UseServiceWorker = Cfg.Section("ui").Key("USE_SERVICE_WORKER").MustBool(false)
10461046

10471047
HasRobotsTxt, err = util.IsFile(path.Join(CustomPath, "robots.txt"))
10481048
if err != nil {

routers/web/repo/issue.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -2557,7 +2557,7 @@ func updateAttachments(item interface{}, files []string) error {
25572557
case *models.Comment:
25582558
attachments = content.Attachments
25592559
default:
2560-
return fmt.Errorf("Unknown Type: %T", content)
2560+
return fmt.Errorf("unknown Type: %T", content)
25612561
}
25622562
for i := 0; i < len(attachments); i++ {
25632563
if util.IsStringInSlice(attachments[i].UUID, files) {
@@ -2575,7 +2575,7 @@ func updateAttachments(item interface{}, files []string) error {
25752575
case *models.Comment:
25762576
err = content.UpdateAttachments(files)
25772577
default:
2578-
return fmt.Errorf("Unknown Type: %T", content)
2578+
return fmt.Errorf("unknown Type: %T", content)
25792579
}
25802580
if err != nil {
25812581
return err
@@ -2587,7 +2587,7 @@ func updateAttachments(item interface{}, files []string) error {
25872587
case *models.Comment:
25882588
content.Attachments, err = repo_model.GetAttachmentsByCommentID(content.ID)
25892589
default:
2590-
return fmt.Errorf("Unknown Type: %T", content)
2590+
return fmt.Errorf("unknown Type: %T", content)
25912591
}
25922592
return err
25932593
}

routers/web/repo/lfs.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ func LFSLocks(ctx *context.Context) {
120120
Shared: true,
121121
}); err != nil {
122122
log.Error("Failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err)
123-
ctx.ServerError("LFSLocks", fmt.Errorf("Failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err))
123+
ctx.ServerError("LFSLocks", fmt.Errorf("failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err))
124124
return
125125
}
126126

127127
gitRepo, err := git.OpenRepositoryCtx(ctx, tmpBasePath)
128128
if err != nil {
129129
log.Error("Unable to open temporary repository: %s (%v)", tmpBasePath, err)
130-
ctx.ServerError("LFSLocks", fmt.Errorf("Failed to open new temporary repository in: %s %v", tmpBasePath, err))
130+
ctx.ServerError("LFSLocks", fmt.Errorf("failed to open new temporary repository in: %s %v", tmpBasePath, err))
131131
return
132132
}
133133
defer gitRepo.Close()
@@ -140,7 +140,7 @@ func LFSLocks(ctx *context.Context) {
140140

141141
if err := gitRepo.ReadTreeToIndex(ctx.Repo.Repository.DefaultBranch); err != nil {
142142
log.Error("Unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err)
143-
ctx.ServerError("LFSLocks", fmt.Errorf("Unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err))
143+
ctx.ServerError("LFSLocks", fmt.Errorf("unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err))
144144
return
145145
}
146146

@@ -525,14 +525,14 @@ func LFSAutoAssociate(ctx *context.Context) {
525525
for i, oid := range oids {
526526
idx := strings.IndexRune(oid, ' ')
527527
if idx < 0 || idx+1 > len(oid) {
528-
ctx.ServerError("LFSAutoAssociate", fmt.Errorf("Illegal oid input: %s", oid))
528+
ctx.ServerError("LFSAutoAssociate", fmt.Errorf("illegal oid input: %s", oid))
529529
return
530530
}
531531
var err error
532532
metas[i] = &models.LFSMetaObject{}
533533
metas[i].Size, err = strconv.ParseInt(oid[idx+1:], 10, 64)
534534
if err != nil {
535-
ctx.ServerError("LFSAutoAssociate", fmt.Errorf("Illegal oid input: %s %v", oid, err))
535+
ctx.ServerError("LFSAutoAssociate", fmt.Errorf("illegal oid input: %s %v", oid, err))
536536
return
537537
}
538538
metas[i].Oid = oid[:idx]

routers/web/repo/webhook.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func getOrgRepoCtx(ctx *context.Context) (*orgRepoCtx, error) {
106106
}, nil
107107
}
108108

109-
return nil, errors.New("Unable to set OrgRepo context")
109+
return nil, errors.New("unable to set OrgRepo context")
110110
}
111111

112112
func checkHookType(ctx *context.Context) string {

0 commit comments

Comments
 (0)