aboutsummaryrefslogtreecommitdiffstats
path: root/modules/migrations
diff options
context:
space:
mode:
authorRob Watson <rfwatson@users.noreply.github.com>2019-05-25 23:18:27 +0200
committerzeripath <art27@cantab.net>2019-05-25 22:18:27 +0100
commitdaaae2aad5b63f916826ef602c8347b6fd1e2372 (patch)
treeb14a7b4bd6404bf32abe9bfbc158d481c861d597 /modules/migrations
parent355ab0c62c1d58200d68e30d112db398ea00297a (diff)
downloadgitea-daaae2aad5b63f916826ef602c8347b6fd1e2372.tar.gz
gitea-daaae2aad5b63f916826ef602c8347b6fd1e2372.zip
migrations: ensure rollback on error (#7039) (#7040)
Diffstat (limited to 'modules/migrations')
-rw-r--r--modules/migrations/gitea.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/migrations/gitea.go b/modules/migrations/gitea.go
index dcffb360e3..4e930fa831 100644
--- a/modules/migrations/gitea.go
+++ b/modules/migrations/gitea.go
@@ -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
}