diff options
author | David Kim <dkim@gitlab.com> | 2020-04-08 11:02:05 +0930 |
---|---|---|
committer | David Kim <dkim@gitlab.com> | 2020-04-08 11:02:05 +0930 |
commit | 37b929f9e2dea90d53f19618294b0cce5c28071b (patch) | |
tree | 1eb7e5ca798d28f7955c109e015393351dff1898 | |
parent | a9d9243401d887083477079192eb30452f7ccfc3 (diff) | |
download | gitlab-shell-37b929f9e2dea90d53f19618294b0cce5c28071b.tar.gz |
Remove unnecessary command argument
-rw-r--r-- | internal/command/receivepack/gitalycall.go | 2 | ||||
-rw-r--r-- | internal/command/uploadarchive/gitalycall.go | 2 | ||||
-rw-r--r-- | internal/command/uploadpack/gitalycall.go | 2 | ||||
-rw-r--r-- | internal/handler/exec.go | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/internal/command/receivepack/gitalycall.go b/internal/command/receivepack/gitalycall.go index c1c6e03..d732197 100644 --- a/internal/command/receivepack/gitalycall.go +++ b/internal/command/receivepack/gitalycall.go @@ -35,7 +35,7 @@ func (c *Command) performGitalyCall(response *accessverifier.Response) error { ctx, cancel := context.WithCancel(ctx) defer cancel() - gc.LogExecution("git-receive-pack", request.Repository, response, "") + gc.LogExecution(request.Repository, response, "") rw := c.ReadWriter return client.ReceivePack(ctx, conn, rw.In, rw.Out, rw.ErrOut, request) diff --git a/internal/command/uploadarchive/gitalycall.go b/internal/command/uploadarchive/gitalycall.go index 40a5359..1b792cb 100644 --- a/internal/command/uploadarchive/gitalycall.go +++ b/internal/command/uploadarchive/gitalycall.go @@ -27,7 +27,7 @@ func (c *Command) performGitalyCall(response *accessverifier.Response) error { ctx, cancel := context.WithCancel(ctx) defer cancel() - gc.LogExecution("git-upload-archive", request.Repository, response, "") + gc.LogExecution(request.Repository, response, "") rw := c.ReadWriter return client.UploadArchive(ctx, conn, rw.In, rw.Out, rw.ErrOut, request) diff --git a/internal/command/uploadpack/gitalycall.go b/internal/command/uploadpack/gitalycall.go index d33fac8..c15ef38 100644 --- a/internal/command/uploadpack/gitalycall.go +++ b/internal/command/uploadpack/gitalycall.go @@ -32,7 +32,7 @@ func (c *Command) performGitalyCall(response *accessverifier.Response) error { ctx, cancel := context.WithCancel(ctx) defer cancel() - gc.LogExecution("git-upload-pack", request.Repository, response, request.GitProtocol) + gc.LogExecution(request.Repository, response, request.GitProtocol) rw := c.ReadWriter return client.UploadPack(ctx, conn, rw.In, rw.Out, rw.ErrOut, request) diff --git a/internal/handler/exec.go b/internal/handler/exec.go index 977fadc..3af0925 100644 --- a/internal/handler/exec.go +++ b/internal/handler/exec.go @@ -55,9 +55,9 @@ func (gc *GitalyCommand) RunGitalyCommand(handler GitalyHandlerFunc) error { return err } -func (gc *GitalyCommand) LogExecution(command string, repository *pb.Repository, response *accessverifier.Response, protocol string) { +func (gc *GitalyCommand) LogExecution(repository *pb.Repository, response *accessverifier.Response, protocol string) { fields := log.Fields{ - "command": command, + "command": gc.ServiceName, "gl_project_path": repository.GlProjectPath, "gl_repository": repository.GlRepository, "user_id": response.UserId, |