-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix a bug where lfs gc never worked. #35198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
But is it right? Is the In the future, if a change in |
The test just demonstrate there is a bug in the INI package. |
Why not provide a correct test for real code? |
17e00d6 added a test for Get GC LFS configuration |
Fix go-gitea#31113 After go-gitea#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.
Backport #35198 by @lunny Fix #31113 After #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. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* giteaofficial/main: Refactor smal code snippeds in models/issues/pull.go (go-gitea#35301) fix: remove duplicate IDs (go-gitea#35210) Add start time on perf trace because it seems some steps haven't been recorded. (go-gitea#35282) nix dev shell add zip (go-gitea#35300) [skip ci] Updated translations via Crowdin Fix LFS range size header response (go-gitea#35277) Skip "parentsigned" check when the repo is empty (go-gitea#35292) [skip ci] Updated translations via Crowdin Fix GitHub release assets URL validation (go-gitea#35287) nix flake use go1.25 (go-gitea#35288) go1.25.0 (go-gitea#35262) fix nix dev shell on darwin (go-gitea#35278) Fix token lifetime, closes go-gitea#35230 (go-gitea#35271) OneDev migration: fix broken migration caused by various REST API changes in OneDev 7.8.0 and later (go-gitea#35216) [skip ci] Updated translations via Crowdin Fix font-size in inline code comment preview (go-gitea#35209) Fix a bug where lfs gc never worked. (go-gitea#35198)
Fix #31113
After #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.