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-01-12 10:58:10 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-01-14 10:19:16 +0300
commita35ca6f1a39069b8ff79025b05d0ec3063b67842 (patch)
treee54c78e56c461bb5e58bca1ef400dac123314b8e /internal/gitaly/service/repository/apply_gitattributes.go
parent036626d8f341b37d837062447ecb238e9b1ab2c2 (diff)
catfile: Convert interface to accept Revisions
Instead of accepting untyped strings, this commit refactors the catfile interface to accept Revisions instead.
Diffstat (limited to 'internal/gitaly/service/repository/apply_gitattributes.go')
-rw-r--r--internal/gitaly/service/repository/apply_gitattributes.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/gitaly/service/repository/apply_gitattributes.go b/internal/gitaly/service/repository/apply_gitattributes.go
index eef1e868a..d8926e312 100644
--- a/internal/gitaly/service/repository/apply_gitattributes.go
+++ b/internal/gitaly/service/repository/apply_gitattributes.go
@@ -21,7 +21,7 @@ func applyGitattributes(ctx context.Context, c catfile.Batch, repoPath string, r
infoPath := filepath.Join(repoPath, "info")
attributesPath := filepath.Join(infoPath, "attributes")
- _, err := c.Info(ctx, string(revision))
+ _, err := c.Info(ctx, git.Revision(revision))
if err != nil {
if catfile.IsNotFound(err) {
return status.Errorf(codes.InvalidArgument, "Revision doesn't exist")
@@ -30,7 +30,7 @@ func applyGitattributes(ctx context.Context, c catfile.Batch, repoPath string, r
return err
}
- blobInfo, err := c.Info(ctx, fmt.Sprintf("%s:.gitattributes", revision))
+ blobInfo, err := c.Info(ctx, git.Revision(fmt.Sprintf("%s:.gitattributes", revision)))
if err != nil && !catfile.IsNotFound(err) {
return err
}
@@ -55,7 +55,7 @@ func applyGitattributes(ctx context.Context, c catfile.Batch, repoPath string, r
}
defer os.Remove(tempFile.Name())
- blobObj, err := c.Blob(ctx, blobInfo.Oid)
+ blobObj, err := c.Blob(ctx, git.Revision(blobInfo.Oid))
if err != nil {
return err
}