Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-03-05 15:14:49 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-03-09 14:30:33 +0300
commitfb76136dee3965cd66fe445f97f831fefca5df88 (patch)
treec033529fc7663d67e7a3e76b896920fe7dd17fea /internal/gitaly/service/repository/apply_gitattributes.go
parent0dda4808b7ae13f7eca80ffb6b40255d0cdc8d50 (diff)
catfile: Convert ObjectInfo to use typed OID
The ObjectInfo is currently using a string OID. Convert it to use the proper ObjectID type. This also increases safety in case we ever get something from git-cat-file(1) which is not a recognized OID.
Diffstat (limited to 'internal/gitaly/service/repository/apply_gitattributes.go')
-rw-r--r--internal/gitaly/service/repository/apply_gitattributes.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/internal/gitaly/service/repository/apply_gitattributes.go b/internal/gitaly/service/repository/apply_gitattributes.go
index 6c4335f84..0f0728d29 100644
--- a/internal/gitaly/service/repository/apply_gitattributes.go
+++ b/internal/gitaly/service/repository/apply_gitattributes.go
@@ -83,13 +83,8 @@ func (s *server) applyGitattributes(ctx context.Context, c catfile.Batch, repoPa
return err
}
- blobOID, err := git.NewObjectIDFromHex(blobInfo.Oid)
- if err != nil {
- return err
- }
-
// Vote on the contents of the newly written gitattributes file.
- if err := s.vote(ctx, blobOID); err != nil {
+ if err := s.vote(ctx, blobInfo.Oid); err != nil {
return fmt.Errorf("could not commit gitattributes: %w", err)
}