aboutsummaryrefslogtreecommitdiff
path: root/object/fetch/exact_commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'object/fetch/exact_commit.go')
-rw-r--r--object/fetch/exact_commit.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/object/fetch/exact_commit.go b/object/fetch/exact_commit.go
deleted file mode 100644
index 9483b2b1..00000000
--- a/object/fetch/exact_commit.go
+++ /dev/null
@@ -1,26 +0,0 @@
-package fetch
-
-import (
- giterrors "codeberg.org/lindenii/furgit/errors"
- "codeberg.org/lindenii/furgit/object/commit"
- objectid "codeberg.org/lindenii/furgit/object/id"
- "codeberg.org/lindenii/furgit/object/stored"
- objecttype "codeberg.org/lindenii/furgit/object/type"
-)
-
-// ExactCommit reads, parses, and wraps the commit at id.
-//
-// Labels: Life-Parent.
-func (r *Fetcher) ExactCommit(id objectid.ObjectID) (*stored.Stored[*commit.Commit], error) {
- parsed, err := r.parseObject(id)
- if err != nil {
- return nil, err
- }
-
- commit, ok := parsed.(*commit.Commit)
- if !ok {
- return nil, &giterrors.ObjectTypeError{OID: id, Got: parsed.ObjectType(), Want: objecttype.TypeCommit}
- }
-
- return stored.New(id, commit), nil
-}