diff options
Diffstat (limited to 'object/fetch/exact_commit_reader.go')
| -rw-r--r-- | object/fetch/exact_commit_reader.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/object/fetch/exact_commit_reader.go b/object/fetch/exact_commit_reader.go new file mode 100644 index 00000000..5ccae4b1 --- /dev/null +++ b/object/fetch/exact_commit_reader.go @@ -0,0 +1,16 @@ +package fetch + +import ( + "io" + + objectid "codeberg.org/lindenii/furgit/object/id" + objecttype "codeberg.org/lindenii/furgit/object/type" +) + +// ExactCommitReader returns a reader for the content of the commit at id, +// together with its content size in bytes. +// +// Usage of this method is unusual. +func (r *Fetcher) ExactCommitReader(id objectid.ObjectID) (io.ReadCloser, int64, error) { + return r.exactReader(id, objecttype.TypeCommit, "commit") +} |
