0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-23 15:53:07 -05:00

migrations: ensure rollback on error (#7039) (#7040)

This commit is contained in:
Rob Watson 2019-05-25 23:18:27 +02:00 committed by zeripath
parent 355ab0c62c
commit daaae2aad5

View file

@ -68,10 +68,10 @@ func (g *GiteaLocalUploader) CreateRepo(repo *base.Repository, includeWiki bool)
IsPrivate: repo.IsPrivate,
Wiki: includeWiki,
})
g.repo = r
if err != nil {
return err
}
g.repo = r
g.gitRepo, err = git.OpenRepository(r.RepoPath())
return err
}