diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-03-09 15:25:59 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-03-11 10:14:39 +0300 |
commit | db74b76121b84060c79a82f78f83444e167bdb73 (patch) | |
tree | 4fd47efee30f9aa24c28d5fcc7c1593d27b4d167 /internal/gitaly/service/diff | |
parent | 308eb2b0f6dc43d739b79274417713818376f946 (diff) |
global: Convert to use `WithConfig()`
The `GlobalOption`s parameter for git commands is going away. This
commit thus replaces all usages where it's used to inject configuration
with the new `WithConfig()` function.
Diffstat (limited to 'internal/gitaly/service/diff')
-rw-r--r-- | internal/gitaly/service/diff/commit.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/gitaly/service/diff/commit.go b/internal/gitaly/service/diff/commit.go index 7d4fa07fb..2f84bf1c6 100644 --- a/internal/gitaly/service/diff/commit.go +++ b/internal/gitaly/service/diff/commit.go @@ -206,11 +206,9 @@ func validateRequest(in requestWithLeftRightCommitIds) error { } func (s *server) eachDiff(ctx context.Context, rpc string, repo *gitalypb.Repository, subCmd git.Cmd, limits diff.Limits, callback func(*diff.Diff) error) error { - diffArgs := []git.GlobalOption{ - git.ConfigPair{Key: "diff.noprefix", Value: "false"}, - } + diffConfig := git.ConfigPair{Key: "diff.noprefix", Value: "false"} - cmd, err := s.gitCmdFactory.New(ctx, repo, diffArgs, subCmd) + cmd, err := s.gitCmdFactory.New(ctx, repo, nil, subCmd, git.WithConfig(diffConfig)) if err != nil { if _, ok := status.FromError(err); ok { return err |