aboutsummaryrefslogtreecommitdiff
path: root/format/commitgraph/oidat.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-06 11:54:21 +0800
committerGravatar Runxi Yu2026-03-06 11:55:56 +0800
commitc62c5544fa23378843a3383a9dcd4494e5ea33bc (patch)
tree8b825a36767fe0ba3fb44f27cb634047c4c0318f /format/commitgraph/oidat.go
parentformat/pack/ingest: Fix delta apply import (diff)
signatureNo signature
format/commitgraph: Split into ./read and ./ v0.1.60
Diffstat (limited to 'format/commitgraph/oidat.go')
-rw-r--r--format/commitgraph/oidat.go36
1 files changed, 0 insertions, 36 deletions
diff --git a/format/commitgraph/oidat.go b/format/commitgraph/oidat.go
deleted file mode 100644
index e277125b..00000000
--- a/format/commitgraph/oidat.go
+++ /dev/null
@@ -1,36 +0,0 @@
-package commitgraph
-
-import (
- "codeberg.org/lindenii/furgit/internal/intconv"
- "codeberg.org/lindenii/furgit/objectid"
-)
-
-// OIDAt returns object ID at one position.
-func (reader *Reader) OIDAt(pos Position) (objectid.ObjectID, error) {
- layer, err := reader.layerByPosition(pos)
- if err != nil {
- return objectid.ObjectID{}, err
- }
-
- hashSize := reader.algo.Size()
-
- hashSizeU64, err := intconv.IntToUint64(hashSize)
- if err != nil {
- return objectid.ObjectID{}, err
- }
-
- start64 := uint64(pos.Index) * hashSizeU64
- end64 := start64 + hashSizeU64
-
- start, err := intconv.Uint64ToInt(start64)
- if err != nil {
- return objectid.ObjectID{}, err
- }
-
- end, err := intconv.Uint64ToInt(end64)
- if err != nil {
- return objectid.ObjectID{}, err
- }
-
- return objectid.FromBytes(reader.algo, layer.chunkOIDLookup[start:end])
-}