gitforge/modules/setting
forgejo-backport-action 4dce932690 [v11.0/forgejo] fix: LFS GC is never running because of a bug in the parsing of the INI file (#9222)
**Backport:** https://codeberg.org/forgejo/forgejo/pulls/9202

After https://github.com/go-gitea/gitea/pull/22385 introduced LFS GC, it never worked due to a bug in the INI library: fields in structs embedded more than one level deep are not populated from the INI file.

This PR fixes the issue by replacing the multi-level embedded struct with a single-level struct for parsing the cron.gc_lfs configuration.

Added a new test for retrieving cron settings to demonstrate the bug in the INI package.

---

Fix #9048 by cherrypicking the fix from Gitea

Gitea PR: https://github.com/go-gitea/gitea/pull/35198

Confirmed to work on my own instance, I now see the cron schedule for gc_lfs listed in the site admin menu where it was empty before

<!--start release-notes-assistant-->

## Release notes
<!--URL:https://codeberg.org/forgejo/forgejo-->
- Bug fixes
  - [PR](https://codeberg.org/forgejo/forgejo/pulls/9202): <!--number 9202 --><!--line 0 --><!--description TEZTIEdDIGlzIG5ldmVyIHJ1bm5pbmcgYmVjYXVzZSBvZiBhIGJ1ZyBpbiB0aGUgcGFyc2luZyBvZiB0aGUgSU5JIGZpbGU=-->LFS GC is never running because of a bug in the parsing of the INI file<!--description-->
<!--end release-notes-assistant-->

Co-authored-by: Andrew Cassidy <drewcassidy@me.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9222
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
Co-committed-by: forgejo-backport-action <forgejo-backport-action@noreply.codeberg.org>
2025-09-09 23:39:20 +02:00
..
config [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
actions.go
actions_test.go
admin.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
admin_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
api.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
asset_dynamic.go
asset_static.go
attachment.go
attachment_test.go
badges.go
cache.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
camo.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
config.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
config_env.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
config_env_test.go
config_provider.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
config_provider_test.go
cors.go Fix settings not being loaded at CLI (#26402) 2025-01-05 12:13:48 +00:00
cron.go
cron_test.go [v11.0/forgejo] fix: LFS GC is never running because of a bug in the parsing of the INI file (#9222) 2025-09-09 23:39:20 +02:00
database.go
database_sqlite.go
database_test.go
disposable_email_domain_data.go
f3.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
federation.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
forgejo_storage_test.go
git.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
git_test.go
highlight.go
i18n.go [v11.0/forgejo] fix(UI): i18n: improve naming (#7542) 2025-04-15 06:24:49 +00:00
incoming_email.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
incoming_email_test.go
indexer.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
indexer_test.go
lfs.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
lfs_test.go
log.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
log_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
mailer.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
mailer_test.go
markup.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
metrics.go
migrations.go
mime_type_map.go
mirror.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
oauth2.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
oauth2_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
other.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
packages.go Alt Linux Apt-Rpm repository support for Forgejo packages. (#6351) 2025-01-22 14:01:49 +00:00
packages_test.go
path.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
path_test.go
picture.go
project.go
proxy.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
queue.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
quota.go
repository.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
repository_archive.go
repository_archive_test.go
security.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
server.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
server_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
service.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
service_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
session.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
setting.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
setting_test.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
ssh.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
storage.go
storage_test.go
task.go
time.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
ui.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00
webhook.go [v11.0/forgejo] chore: branding import path (#7354) 2025-03-27 20:13:05 +00:00