]> source.dussan.org Git - gitea.git/commit
Add Close() method to gogitRepository (#8901)
authorzeripath <art27@cantab.net>
Wed, 13 Nov 2019 07:01:19 +0000 (07:01 +0000)
committerGitHub <noreply@github.com>
Wed, 13 Nov 2019 07:01:19 +0000 (07:01 +0000)
commit722a7c902dd39bd3d4328345ca969220640774d7
tree7fb83b70fd9df55fd7d3a805adf38238d6a9bca8
parent7b97e045557788efee6803261cf612eaf975c6be
Add Close() method to gogitRepository (#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
75 files changed:
cmd/admin.go
docs/content/doc/advanced/migrations.en-us.md
integrations/api_releases_test.go
integrations/api_repo_file_create_test.go
integrations/api_repo_file_update_test.go
integrations/api_repo_get_contents_list_test.go
integrations/api_repo_get_contents_test.go
integrations/api_repo_git_tags_test.go
integrations/repofiles_delete_test.go
integrations/repofiles_update_test.go
models/graph_test.go
models/migrations/v39.go
models/migrations/v82.go
models/pull.go
models/repo.go
models/repo_activity.go
models/repo_branch.go
models/repo_sign.go
models/repo_tag.go [deleted file]
models/wiki.go
models/wiki_test.go
modules/context/api.go
modules/context/repo.go
modules/git/blame.go
modules/git/blob_test.go
modules/git/commit_info_test.go
modules/git/notes_test.go
modules/git/repo.go
modules/git/repo_blob_test.go
modules/git/repo_branch.go
modules/git/repo_branch_test.go
modules/git/repo_commit_test.go
modules/git/repo_compare_test.go
modules/git/repo_ref_test.go
modules/git/repo_stats_test.go
modules/git/repo_tag_test.go
modules/git/repo_test.go
modules/git/tree_entry_test.go
modules/migrations/base/uploader.go
modules/migrations/gitea.go
modules/migrations/migrate.go
modules/notification/webhook/webhook.go
modules/repofiles/action.go
modules/repofiles/blob.go
modules/repofiles/blob_test.go
modules/repofiles/commit_status.go
modules/repofiles/content.go
modules/repofiles/content_test.go
modules/repofiles/diff_test.go
modules/repofiles/file_test.go
modules/repofiles/temp_repo.go
modules/repofiles/tree.go
modules/repofiles/tree_test.go
modules/repofiles/update.go
modules/test/context_tests.go
routers/api/v1/api.go
routers/api/v1/repo/commits.go
routers/api/v1/repo/file.go
routers/api/v1/repo/git_ref.go
routers/api/v1/repo/pull.go
routers/api/v1/repo/tag.go
routers/repo/compare.go
routers/repo/editor_test.go
routers/repo/pull.go
routers/repo/release_test.go
routers/repo/setting.go
routers/repo/wiki.go
routers/repo/wiki_test.go
services/comments/comments.go
services/gitdiff/gitdiff.go
services/mirror/mirror.go
services/mirror/mirror_test.go
services/pull/commit_status.go
services/pull/pull.go
services/release/release_test.go