diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-05-07 14:12:04 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-05-07 15:49:22 +0300 |
commit | 8ef105cbe55b3095a233aeba9e1c708beeb52272 (patch) | |
tree | 4ed431a36fd71a0e4748192395a99c47c20c862f /internal/gitaly/service/repository/apply_gitattributes.go | |
parent | 364b68ee434fd2028dd9a5e9553e2fbd8384f5c8 (diff) |
metadata: Move transaction metadata into shared package
Now that we have a shared `internal/transaction` package, it makes sense
to move over transactional metadata there too given that it's used by
both Gitaly and Praefect. This commit thus moves the package and renames
it to `txinfo`, which gives a lot more context compared to the generic
`metadata` name.
Diffstat (limited to 'internal/gitaly/service/repository/apply_gitattributes.go')
-rw-r--r-- | internal/gitaly/service/repository/apply_gitattributes.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/gitaly/service/repository/apply_gitattributes.go b/internal/gitaly/service/repository/apply_gitattributes.go index 6d7586973..92c46056e 100644 --- a/internal/gitaly/service/repository/apply_gitattributes.go +++ b/internal/gitaly/service/repository/apply_gitattributes.go @@ -11,7 +11,7 @@ import ( "gitlab.com/gitlab-org/gitaly/internal/git" "gitlab.com/gitlab-org/gitaly/internal/git/catfile" - "gitlab.com/gitlab-org/gitaly/internal/praefect/metadata" + "gitlab.com/gitlab-org/gitaly/internal/transaction/txinfo" "gitlab.com/gitlab-org/gitaly/internal/transaction/voting" "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb" "google.golang.org/grpc/codes" @@ -93,12 +93,12 @@ func (s *server) applyGitattributes(ctx context.Context, c catfile.Batch, repoPa } func (s *server) vote(ctx context.Context, oid git.ObjectID) error { - tx, err := metadata.TransactionFromContext(ctx) - if errors.Is(err, metadata.ErrTransactionNotFound) { + tx, err := txinfo.TransactionFromContext(ctx) + if errors.Is(err, txinfo.ErrTransactionNotFound) { return nil } - praefect, err := metadata.PraefectFromContext(ctx) + praefect, err := txinfo.PraefectFromContext(ctx) if err != nil { return fmt.Errorf("vote has invalid Praefect info: %w", err) } |