diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2025-04-07 22:12:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-07 22:12:54 -0700 |
commit | a100ac3306000885b01abcc08d1672efa880daec (patch) | |
tree | 1c4498ae931238d63af4a3309e93b9fabc0d9b1f /docs/static/cloudron.svg | |
parent | 90b509aafb5c0696cb1b459e9035ab3fc859f26a (diff) | |
download | gitea-main.tar.gz gitea-main.zip |
Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed (#31035)HEADmain
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.
Diffstat (limited to 'docs/static/cloudron.svg')
0 files changed, 0 insertions, 0 deletions