Skip to content

Commit a78e77c

Browse files
committed
Merge remote-tracking branch 'upstream/main'
* upstream/main: Fix container blob mount (go-gitea#22226) Update overview.en-us.md (go-gitea#22463) Add reply hint to mail text (go-gitea#22459) Add cron method to gc LFS MetaObjects (go-gitea#22385) Change use of Walk to WalkDir to improve disk performance (go-gitea#22462) Remove the netgo tag for Windows build (go-gitea#22467) Fix Operator does not exist bug on explore page with ONLY_SHOW_RELEVANT_REPOS (go-gitea#22454) Fix environments for KaTeX and error reporting (go-gitea#22453) Supports wildcard protected branch (go-gitea#20825)
2 parents c3136dd + 3510d7e commit a78e77c

Some content is hidden

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

64 files changed

+1638
-943
lines changed

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,9 @@ $(DIST_DIRS):
758758

759759
.PHONY: release-windows
760760
release-windows: | $(DIST_DIRS)
761-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
761+
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
762762
ifeq (,$(findstring gogit,$(TAGS)))
763-
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
763+
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) run $(XGO_PACKAGE) -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit .
764764
endif
765765
ifeq ($(CI),true)
766766
cp /build/* $(DIST)/binaries

build/generate-bindata.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ func needsUpdate(dir, filename string) (bool, []byte) {
3232

3333
hasher := sha1.New()
3434

35-
err = filepath.Walk(dir, func(path string, info os.FileInfo, err error) error {
35+
err = filepath.WalkDir(dir, func(path string, d os.DirEntry, err error) error {
3636
if err != nil {
3737
return err
3838
}
39-
_, _ = hasher.Write([]byte(info.Name()))
39+
info, err := d.Info()
40+
if err != nil {
41+
return err
42+
}
43+
_, _ = hasher.Write([]byte(d.Name()))
4044
_, _ = hasher.Write([]byte(info.ModTime().String()))
4145
_, _ = hasher.Write([]byte(strconv.FormatInt(info.Size(), 16)))
4246
return nil

custom/conf/app.example.ini

+22
Original file line numberDiff line numberDiff line change
@@ -2213,6 +2213,28 @@ ROUTER = console
22132213
;SCHEDULE = @every 168h
22142214
;OLDER_THAN = 8760h
22152215

2216+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2217+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2218+
;; Garbage collect LFS pointers in repositories
2219+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2220+
;[cron.gc_lfs]
2221+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2222+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2223+
;ENABLED = false
2224+
;; Garbage collect LFS pointers in repositories (default false)
2225+
;RUN_AT_START = false
2226+
;; Interval as a duration between each gc run (default every 24h)
2227+
;SCHEDULE = @every 24h
2228+
;; Only attempt to garbage collect LFSMetaObjects older than this (default 7 days)
2229+
;OLDER_THAN = 168h
2230+
;; Only attempt to garbage collect LFSMetaObjects that have not been attempted to be garbage collected for this long (default 3 days)
2231+
;LAST_UPDATED_MORE_THAN_AGO = 72h
2232+
; Minimum number of stale LFSMetaObjects to check per repo. Set to `0` to always check all.
2233+
;NUMBER_TO_CHECK_PER_REPO = 100
2234+
;Check at least this proportion of LFSMetaObjects per repo. (This may cause all stale LFSMetaObjects to be checked.)
2235+
;PROPORTION_TO_CHECK_PER_REPO = 0.6
2236+
2237+
22162238
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22172239
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22182240
;; Git Operation timeout in seconds

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

+10
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,16 @@ Default templates for project boards:
10391039
- `SCHEDULE`: **@every 168h**: Cron syntax to set how often to check.
10401040
- `OLDER_THAN`: **@every 8760h**: any system notice older than this expression will be deleted from database.
10411041

1042+
#### Cron - Garbage collect LFS pointers in repositories ('cron.gc_lfs')
1043+
1044+
- `ENABLED`: **false**: Enable service.
1045+
- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED).
1046+
- `SCHEDULE`: **@every 24h**: Cron syntax to set how often to check.
1047+
- `OLDER_THAN`: **168h**: Only attempt to garbage collect LFSMetaObjects older than this (default 7 days)
1048+
- `LAST_UPDATED_MORE_THAN_AGO`: **72h**: Only attempt to garbage collect LFSMetaObjects that have not been attempted to be garbage collected for this long (default 3 days)
1049+
- `NUMBER_TO_CHECK_PER_REPO`: **100**: Minimum number of stale LFSMetaObjects to check per repo. Set to `0` to always check all.
1050+
- `PROPORTION_TO_CHECK_PER_REPO`: **0.6**: Check at least this proportion of LFSMetaObjects per repo. (This may cause all stale LFSMetaObjects to be checked.)
1051+
10421052
## Git (`git`)
10431053

10441054
- `PATH`: **""**: The path of Git executable. If empty, Gitea searches through the PATH environment.

docs/content/doc/packages/overview.en-us.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ and shows a link to the repository on the package site (as well as a link to the
5555

5656
| Package owner type | User | Organization |
5757
|--------------------|------|--------------|
58-
| **read** access | public, if user is public too; otherwise for this user only | public, if org is public, otherwise org members only |
58+
| **read** access | public, if user is public too; otherwise for this user only | public, if org is public, otherwise for org members only |
5959
| **write** access | owner only | org members with admin or write access to the org |
6060

6161
N.B.: These access restrictions are [subject to change](https://github.com/go-gitea/gitea/issues/19270), where more finegrained control will be added via a dedicated organization team permission.
@@ -83,7 +83,7 @@ To download a package from your repository:
8383

8484
## Delete a package
8585

86-
You cannot edit a package after you published it in the Package Registry. Instead, you
86+
You cannot edit a package after you have published it in the Package Registry. Instead, you
8787
must delete and recreate it.
8888

8989
To delete a package from your repository:

0 commit comments

Comments
 (0)