mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Ensure that git daemon export ok is created for mirrors (#17243)
* Ensure that git daemon export ok is created for mirrors There is an issue with #16508 where it appears that create repo requires that the repo does not exist. This causes #17241 where an error is reported because of this. This PR fixes this and also runs update-server-info for mirrors and generated repos. Fix #17241 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
@@ -31,6 +31,14 @@ type Context struct {
|
||||
e Engine
|
||||
}
|
||||
|
||||
// WithEngine returns a db.Context from a context.Context and db.Engine
|
||||
func WithEngine(ctx context.Context, e Engine) *Context {
|
||||
return &Context{
|
||||
Context: ctx,
|
||||
e: e,
|
||||
}
|
||||
}
|
||||
|
||||
// Engine returns db engine
|
||||
func (ctx *Context) Engine() Engine {
|
||||
return ctx.e
|
||||
|
Reference in New Issue
Block a user