0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-04-24 10:53:10 +02:00
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
..
2025-03-03 05:36:10 +00:00
2025-04-01 10:14:01 +00:00
2024-03-04 08:16:03 +00:00
2024-04-07 19:17:06 +08:00
2023-12-25 21:25:29 +01:00
2025-04-01 10:14:01 +00:00
2025-04-05 11:56:48 +08:00
2024-03-04 08:16:03 +00:00
2025-01-07 01:54:06 +08:00
2024-03-04 08:16:03 +00:00
2025-04-01 10:14:01 +00:00