diff options
Diffstat (limited to 'workhorse/internal/git/upload-pack.go')
-rw-r--r-- | workhorse/internal/git/upload-pack.go | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/workhorse/internal/git/upload-pack.go b/workhorse/internal/git/upload-pack.go index bbed5224b2d..ef2a00bf3ac 100644 --- a/workhorse/internal/git/upload-pack.go +++ b/workhorse/internal/git/upload-pack.go @@ -9,7 +9,6 @@ import ( "gitlab.com/gitlab-org/gitlab/workhorse/internal/api" "gitlab.com/gitlab-org/gitlab/workhorse/internal/gitaly" - "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper" ) var ( @@ -31,8 +30,8 @@ func handleUploadPack(w *HttpResponseWriter, r *http.Request, a *api.Response) e readerCtx, cancel := context.WithTimeout(ctx, uploadPackTimeout) defer cancel() - limited := helper.NewContextReader(readerCtx, r.Body) - cr, cw := helper.NewWriteAfterReader(limited, w) + limited := newContextReader(readerCtx, r.Body) + cr, cw := newWriteAfterReader(limited, w) defer cw.Flush() action := getService(r) @@ -44,13 +43,7 @@ func handleUploadPack(w *HttpResponseWriter, r *http.Request, a *api.Response) e } func handleUploadPackWithGitaly(ctx context.Context, a *api.Response, clientRequest io.Reader, clientResponse io.Writer, gitProtocol string) error { - ctx, smarthttp, err := gitaly.NewSmartHTTPClient( - ctx, - a.GitalyServer, - gitaly.WithFeatures(a.GitalyServer.Features), - gitaly.WithUserID(a.GL_ID), - gitaly.WithUsername(a.GL_USERNAME), - ) + ctx, smarthttp, err := gitaly.NewSmartHTTPClient(ctx, a.GitalyServer) if err != nil { return fmt.Errorf("get gitaly client: %w", err) } |