diff options
| author | 2026-03-10 14:19:53 +0800 | |
|---|---|---|
| committer | 2026-03-10 14:19:53 +0800 | |
| commit | 85f1212724e037e6934203f04a3f6231ac609503 (patch) | |
| tree | 8d75a79541422eec0019125b3e9d281aa1613f1f /packfile | |
| parent | packfile: Rename package to packfile (diff) | |
| signature | No signature | |
object/header: Rename from objectheader
Diffstat (limited to 'packfile')
| -rw-r--r-- | packfile/ingest/drain.go | 4 | ||||
| -rw-r--r-- | packfile/ingest/hash.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packfile/ingest/drain.go b/packfile/ingest/drain.go index ce04fcb4..74d2f90c 100644 --- a/packfile/ingest/drain.go +++ b/packfile/ingest/drain.go @@ -5,7 +5,7 @@ import ( "io" "codeberg.org/lindenii/furgit/internal/compress/zlib" - "codeberg.org/lindenii/furgit/objectheader" + "codeberg.org/lindenii/furgit/object/header" "codeberg.org/lindenii/furgit/objectid" "codeberg.org/lindenii/furgit/objecttype" packfmt "codeberg.org/lindenii/furgit/packfile" @@ -26,7 +26,7 @@ func drainEntryPayload(state *ingestState, record objectRecord) (int64, objectid var total int64 if packfmt.IsBaseObjectType(record.packedType) { - header, ok := objectheader.Encode(record.packedType, record.declaredSize) + header, ok := header.Encode(record.packedType, record.declaredSize) if !ok { return 0, zero, &MalformedPackEntryError{Offset: record.offset, Reason: "encode object header"} } diff --git a/packfile/ingest/hash.go b/packfile/ingest/hash.go index 83df55c5..0b8615cd 100644 --- a/packfile/ingest/hash.go +++ b/packfile/ingest/hash.go @@ -3,14 +3,14 @@ package ingest import ( "fmt" - "codeberg.org/lindenii/furgit/objectheader" + "codeberg.org/lindenii/furgit/object/header" "codeberg.org/lindenii/furgit/objectid" "codeberg.org/lindenii/furgit/objecttype" ) // hashCanonicalObject hashes canonical object bytes (header+content). func hashCanonicalObject(algo objectid.Algorithm, ty objecttype.Type, content []byte) (objectid.ObjectID, error) { - header, ok := objectheader.Encode(ty, int64(len(content))) + header, ok := header.Encode(ty, int64(len(content))) if !ok { return objectid.ObjectID{}, fmt.Errorf("packfile/ingest: encode object header for type %d", ty) } |
