gitea/modules
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
..
actions
activitypub
analyze
assetfs
auth
avatar
badge
base
cache
charset
container
csv
dump
emoji
eventsource
fileicon
generate
git
gitrepo
globallock
graceful
gtprof
hcaptcha
highlight
hostmatcher
htmlutil
httpcache
httplib
indexer
issue/template
json
label
lfs
lfstransfer
log
markup
mcaptcha
metrics
migration
nosql
optional
options
packages
paginator
pprof
private
process
proxy
proxyprotocol
public
queue
recaptcha
references
regexplru
repository Rework create/fork/adopt/generate repository to make sure resources will be cleanup once failed (#31035) 2025-04-07 22:12:54 -07:00
reqctx
secret
session
setting
sitemap
ssh
storage
structs
svg
sync
system
tailmsg
templates
test
testlogger
timeutil
translation
turnstile
typesniffer
updatechecker
uri
user
util
validation
web
webhook
zstd