forgejo/models/git
Gusted 7ffa7f5bce
Refactor LFS GC functions
- Remove options that currently aren't set
on `GarbageCollectLFSMetaObjectsOptions` and
`IterateLFSMetaObjectsForRepoOptions`.
- Simplify `IterateRepositoryIDsWithLFSMetaObjects` and
`IterateLFSMetaObjectsForRepo`.
- `IterateLFSMetaObjectsForRepo` was previously able to get in a
loop (`gc-lfs` doctor check was able to reproduce this) because the code
expected that the records would be updated to not match the SQL query,
but that wasn't the case. Simply enforce that only records higher than
the latest `id` from the previous iteration are allowed.
- For `gc-lfs` doctor check this was because `UpdatedLessRecentlyThan`
option was not set, which caused that records just marked as active in
the iteration weren't being filtered.
- Add unit tests
- Most likely a regression from 2cc3a6381c.
- The bug with `gc-lfs` was found on Codeberg.
2024-04-05 16:49:15 +02:00
..
TestIterateRepositoryIDsWithLFSMetaObjects Refactor LFS GC functions 2024-04-05 16:49:15 +02:00
branch.go Fix schedule tasks bugs (#28691) 2024-03-25 16:25:02 +01:00
branch_list.go Start to migrate from util.OptionalBool to optional.Option[bool] (#29329) 2024-02-26 22:30:26 +01:00
branch_test.go Fix schedule tasks bugs (#28691) 2024-03-25 16:25:02 +01:00
commit_status.go Move from max( id ) to max( index ) for latest commit statuses (#30076) 2024-03-30 07:17:31 +01:00
commit_status_test.go fix commit_status 2024-03-24 07:11:19 +01:00
lfs.go Refactor LFS GC functions 2024-04-05 16:49:15 +02:00
lfs_lock.go
lfs_test.go Refactor LFS GC functions 2024-04-05 16:49:15 +02:00
main_test.go
protected_banch_list_test.go
protected_branch.go [FEAT] Configure if protected branch rule should apply to admins 2024-03-29 00:21:49 +01:00
protected_branch_list.go Start to migrate from util.OptionalBool to optional.Option[bool] (#29329) 2024-02-26 22:30:26 +01:00
protected_branch_test.go
protected_tag.go
protected_tag_test.go