diff options
author | zeripath <art27@cantab.net> | 2019-11-13 13:54:04 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-13 13:54:04 +0000 |
commit | 3497efac4ad74e766da6a6eaaca8dddec409040a (patch) | |
tree | 72450c516d434d193c18fdf05cc86c8cb5f63fd1 /modules/migrations/base | |
parent | 43fc99a7ed67152ff95af7c5ae3a7d7b131d567e (diff) | |
download | gitea-3497efac4ad74e766da6a6eaaca8dddec409040a.tar.gz gitea-3497efac4ad74e766da6a6eaaca8dddec409040a.zip |
Add Close() method to gogitRepository (#8901) (#8956)
Backport #8901
In investigating #7947 it has become clear that the storage component of go-git repositories needs closing.
This PR adds this Close function and adds the Close functions as necessary.
In TransferOwnership the ctx.Repo.GitRepo is closed if it is open to help prevent the risk of multiple open files.
Fixes #7947
Diffstat (limited to 'modules/migrations/base')
-rw-r--r-- | modules/migrations/base/uploader.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/migrations/base/uploader.go b/modules/migrations/base/uploader.go index a3a9c9fac6..ae1be84b88 100644 --- a/modules/migrations/base/uploader.go +++ b/modules/migrations/base/uploader.go @@ -17,4 +17,5 @@ type Uploader interface { CreateComments(comments ...*Comment) error CreatePullRequests(prs ...*PullRequest) error Rollback() error + Close() } |