forgejo/services/repository
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
..
archiver
commitstatus fix commit_status 2024-03-24 07:11:19 +01:00
files
adopt.go
adopt_test.go Use more specific test methods (#24265) 2023-04-22 17:56:27 -04:00
avatar.go
avatar_test.go Use context parameter in services/repository (#23186) 2023-02-28 16:17:51 -06:00
branch.go
cache.go
check.go
collaboration.go
collaboration_test.go
commit.go
contributors_graph.go
contributors_graph_test.go
create.go
create_test.go [CLEANUP] make golangci-lint@v1.56.1 happy 2024-02-15 16:19:36 +01:00
delete.go
delete_test.go Delete repos of org when purge delete user (#27273) 2023-10-19 13:16:11 +00:00
fork.go
fork_test.go Add option to prohibit fork if user reached maximum limit of repositories (#21848) 2022-12-27 15:21:14 -06:00
generate.go
generate_test.go
hooks.go
init.go
lfs.go
lfs_test.go
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
migrate.go
push.go
repository.go Remove unnecessary parameter (#27671) 2023-10-18 15:03:10 +00:00
repository_test.go
review.go
review_test.go Use context parameter in services/repository (#23186) 2023-02-28 16:17:51 -06:00
setting.go
template.go
transfer.go
transfer_test.go