gitea/models/git
Lunny Xiao a100ac3306
Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed (#31035)
Fix #28144 

To make the resources will be cleanup once failed. All repository
operations now follow a consistent pattern:

- 1. Create a database record for the repository with the status
being_migrated.
- 2. Register a deferred cleanup function to delete the repository and
its related data if the operation fails.
- 3.	Perform the actual Git and database operations step by step.
- 4. Upon successful completion, update the repository’s status to
ready.

The adopt operation is a special case — if it fails, the repository on
disk should not be deleted.
2025-04-07 22:12:54 -07:00
..
branch_list.go Fix branch order (#31174) 2024-05-31 09:58:41 +08:00
branch_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
branch.go Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed (#31035) 2025-04-07 22:12:54 -07:00
commit_status_summary.go Fix commitstatus summary (#30431) 2024-04-14 14:16:54 +02:00
commit_status_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
commit_status.go Enable addtional linters (#34085) 2025-04-01 10:14:01 +00:00
lfs_lock_list.go Show lock owner instead of repo owner on LFS setting page (#31788) 2024-08-11 14:48:20 +00:00
lfs_lock.go Show lock owner instead of repo owner on LFS setting page (#31788) 2024-08-11 14:48:20 +00:00
lfs.go refactor: remove redundant err declarations (#32381) 2024-10-30 19:36:24 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
protected_branch_list_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
protected_branch_list.go Add priority to protected branch (#32286) 2024-11-27 05:41:06 +01:00
protected_branch_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
protected_branch.go Add priority to protected branch (#32286) 2024-11-27 05:41:06 +01:00
protected_tag_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
protected_tag.go Add tag protection via rest api #17862 (#31295) 2024-06-14 18:56:10 +02:00