aboutsummaryrefslogtreecommitdiff
path: root/object/commit_parse.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-02-20 22:52:58 +0800
committerGravatar Runxi Yu2026-02-20 22:52:58 +0800
commitf49c95662bda1f2c337dbe872644afa1ca5cbbec (patch)
tree502b399c86f0093b50ad5fc80b73f75f4c614733 /object/commit_parse.go
parentconfig: Import from the previous version and fix test harnesses (diff)
signatureNo signature
objectid: Rename from oid
Diffstat (limited to 'object/commit_parse.go')
-rw-r--r--object/commit_parse.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/object/commit_parse.go b/object/commit_parse.go
index 9693b4da..2d207add 100644
--- a/object/commit_parse.go
+++ b/object/commit_parse.go
@@ -5,11 +5,11 @@ import (
"errors"
"fmt"
- "codeberg.org/lindenii/furgit/oid"
+ "codeberg.org/lindenii/furgit/objectid"
)
// ParseCommit decodes a commit object body.
-func ParseCommit(body []byte, algo oid.Algorithm) (*Commit, error) {
+func ParseCommit(body []byte, algo objectid.Algorithm) (*Commit, error) {
c := new(Commit)
i := 0
for i < len(body) {
@@ -30,13 +30,13 @@ func ParseCommit(body []byte, algo oid.Algorithm) (*Commit, error) {
switch string(key) {
case "tree":
- id, err := oid.ParseHex(algo, string(value))
+ id, err := objectid.ParseHex(algo, string(value))
if err != nil {
return nil, fmt.Errorf("object: commit: tree: %w", err)
}
c.Tree = id
case "parent":
- id, err := oid.ParseHex(algo, string(value))
+ id, err := objectid.ParseHex(algo, string(value))
if err != nil {
return nil, fmt.Errorf("object: commit: parent: %w", err)
}