aboutsummaryrefslogtreecommitdiff
path: root/repository/close.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-29 15:43:50 +0000
committerGravatar Runxi Yu2026-03-29 15:45:18 +0000
commitf50ac551c56569e109a8350f27dab53bb2378d4d (patch)
tree0d48976ffaab3455c0c26e2840cb88d2c8d4a3d4 /repository/close.go
parentci: Disable dupl (diff)
signatureNo signature
*: Remove Close from object/ref store interfaces
At places where you own the object, you should have the literal implementation with Close. If you're using it via the interface, then you probably don't own that store, and you shouldn't be closing it. Thanks to Michael Muré from git-bug for this point.
Diffstat (limited to 'repository/close.go')
-rw-r--r--repository/close.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/repository/close.go b/repository/close.go
index 5d728c5b..c1261821 100644
--- a/repository/close.go
+++ b/repository/close.go
@@ -8,20 +8,6 @@ import "errors"
func (repo *Repository) Close() error {
var errs []error
- if repo.refs != nil {
- err := repo.refs.Close()
- if err != nil {
- errs = append(errs, err)
- }
- }
-
- if repo.objects != nil {
- err := repo.objects.Close()
- if err != nil {
- errs = append(errs, err)
- }
- }
-
if repo.commitGraph != nil {
err := repo.commitGraph.Close()
if err != nil {