diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-10-12 12:45:56 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-10-14 08:39:51 +0300 |
commit | 4a3e0895bc811133ce2c93ed79925fc1c9c922e3 (patch) | |
tree | f9983da3b4383baada4f830a093b7c5ffa67cd54 /internal | |
parent | 31205084d5cbf9372fb58e24d5661ddb29bf8558 (diff) |
commit: Convert retrieval of commit signatures to use object reader
Convert retrieval of commit signatures to use an object reader instead
of the deprecated Batch interface. This avoids spawning an unused
process.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/gitaly/service/commit/commit_signatures.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/gitaly/service/commit/commit_signatures.go b/internal/gitaly/service/commit/commit_signatures.go index 82270de0d..d8307ccda 100644 --- a/internal/gitaly/service/commit/commit_signatures.go +++ b/internal/gitaly/service/commit/commit_signatures.go @@ -30,13 +30,13 @@ func (s *server) getCommitSignatures(request *gitalypb.GetCommitSignaturesReques ctx := stream.Context() repo := s.localrepo(request.GetRepository()) - c, err := s.catfileCache.BatchProcess(ctx, repo) + objectReader, err := s.catfileCache.ObjectReader(ctx, repo) if err != nil { return helper.ErrInternal(err) } for _, commitID := range request.CommitIds { - commitObj, err := c.Commit(ctx, git.Revision(commitID)) + commitObj, err := objectReader.Object(ctx, git.Revision(commitID)+"^{commit}") if err != nil { if catfile.IsNotFound(err) { continue |