mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-05 17:06:26 +00:00
refactor: use WithRepo instead of WithDir for most git operations, clean up model migrations (#38555)
by the way, remove some unnecessary "models" imports from model migration package, fix migration test model init bug (modelmigration/migrationtest/tests.go)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// Copyright 2026 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitea.dev/models/unit"
|
||||
)
|
||||
|
||||
// Init initialize model
|
||||
func Init(ctx context.Context) error {
|
||||
return unit.LoadUnitConfig()
|
||||
}
|
||||
Reference in New Issue
Block a user