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-10-22 12:55:03 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-10-28 15:33:50 +0300
commitcc3ec606f5304891b8218d0de9e6bfb192abecf7 (patch)
tree9af9907b1817bb82157ca9962f03725011490c28 /internal/gitaly/service/repository/apply_gitattributes.go
parente91522b289abccdc0d351a5c7ae33db8d17ae006 (diff)
catfile: Have `Object` implement reader interface directly
The `Object` structure is currently embedding an `objectDataReader` structure which provides the ability to read the object's data. Like this, we cannot provide a common `Object` interface that encapsulates all functions required to inspect Git objects though. Implement the reader directly on top of the `catfile.Object` to prepare for the introduction of the `git.Object` interface. This prepares for also providing the `io.WriterTo` interface for writing object data into a writer more efficiently.
Diffstat (limited to 'internal/gitaly/service/repository/apply_gitattributes.go')
-rw-r--r--internal/gitaly/service/repository/apply_gitattributes.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/gitaly/service/repository/apply_gitattributes.go b/internal/gitaly/service/repository/apply_gitattributes.go
index 011e363d5..614e17bbc 100644
--- a/internal/gitaly/service/repository/apply_gitattributes.go
+++ b/internal/gitaly/service/repository/apply_gitattributes.go
@@ -67,7 +67,7 @@ func (s *server) applyGitattributes(ctx context.Context, repo *localrepo.Repo, o
}
defer writer.Close()
- if _, err := io.Copy(writer, blobObj.Reader); err != nil {
+ if _, err := io.Copy(writer, blobObj); err != nil {
return err
}