Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/git/catfile/catfile.go')
-rw-r--r--internal/git/catfile/catfile.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/internal/git/catfile/catfile.go b/internal/git/catfile/catfile.go
index f07026c61..57769d796 100644
--- a/internal/git/catfile/catfile.go
+++ b/internal/git/catfile/catfile.go
@@ -8,7 +8,6 @@ import (
"github.com/prometheus/client_golang/prometheus"
"gitlab.com/gitlab-org/gitaly/internal/git/repository"
"gitlab.com/gitlab-org/gitaly/internal/metadata"
- "gitlab.com/gitlab-org/gitaly/internal/storage"
)
var catfileCacheCounter = prometheus.NewCounterVec(
@@ -142,14 +141,14 @@ func (c *batch) isClosed() bool {
// New returns a new Batch instance. It is important that ctx gets canceled
// somewhere, because if it doesn't the cat-file processes spawned by
// New() never terminate.
-func New(ctx context.Context, locator storage.Locator, repo repository.GitRepo) (Batch, error) {
+func New(ctx context.Context, repo repository.GitRepo) (Batch, error) {
if ctx.Done() == nil {
panic("empty ctx.Done() in catfile.Batch.New()")
}
sessionID := metadata.GetValue(ctx, SessionIDField)
if sessionID == "" {
- c, err := newBatch(ctx, locator, repo)
+ c, err := newBatch(ctx, repo)
if err != nil {
return nil, err
}
@@ -167,7 +166,7 @@ func New(ctx context.Context, locator storage.Locator, repo repository.GitRepo)
// if we are using caching, create a fresh context for the new batch
// and initialize the new batch with a cache key and cancel function
cacheCtx, cacheCancel := context.WithCancel(context.Background())
- c, err := newBatch(cacheCtx, locator, repo)
+ c, err := newBatch(cacheCtx, repo)
if err != nil {
cacheCancel()
return nil, err
@@ -201,7 +200,7 @@ type simulatedBatchSpawnError struct{}
func (simulatedBatchSpawnError) Error() string { return "simulated spawn error" }
-func newBatch(ctx context.Context, locator storage.Locator, repo repository.GitRepo) (_ *batch, err error) {
+func newBatch(ctx context.Context, repo repository.GitRepo) (_ *batch, err error) {
ctx, cancel := context.WithCancel(ctx)
defer func() {
if err != nil {
@@ -209,12 +208,12 @@ func newBatch(ctx context.Context, locator storage.Locator, repo repository.GitR
}
}()
- b, err := newBatchProcess(ctx, locator, repo)
+ b, err := newBatchProcess(ctx, repo)
if err != nil {
return nil, err
}
- batchCheck, err := newBatchCheck(ctx, locator, repo)
+ batchCheck, err := newBatchCheck(ctx, repo)
if err != nil {
return nil, err
}