diff options
| author | 2026-04-02 06:23:30 +0000 | |
|---|---|---|
| committer | 2026-04-02 06:28:39 +0000 | |
| commit | a041d523de389b65b98a5373a8034041db2a8d83 (patch) | |
| tree | 7b423dc735f463be616045f2c3c2095a7737aca7 /format/commitgraph/read/edges.go | |
| parent | research: Add dynamic pack resources (diff) | |
| signature | No signature | |
*: Remove
Diffstat (limited to 'format/commitgraph/read/edges.go')
| -rw-r--r-- | format/commitgraph/read/edges.go | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/format/commitgraph/read/edges.go b/format/commitgraph/read/edges.go deleted file mode 100644 index 96ffeb6d..00000000 --- a/format/commitgraph/read/edges.go +++ /dev/null @@ -1,48 +0,0 @@ -package read - -import ( - "encoding/binary" - - "codeberg.org/lindenii/furgit/format/commitgraph" - "codeberg.org/lindenii/furgit/internal/intconv" -) - -func (reader *Reader) decodeExtraEdgeList(layer *layer, edgeStart uint32) ([]Position, error) { - if len(layer.chunkExtraEdges) == 0 { - return nil, &MalformedError{Path: layer.path, Reason: "missing EDGE chunk"} - } - - out := make([]Position, 0) - - cur := edgeStart - for { - off64 := uint64(cur) * 4 - - off, err := intconv.Uint64ToInt(off64) - if err != nil { - return nil, err - } - - if off+4 > len(layer.chunkExtraEdges) { - return nil, &MalformedError{Path: layer.path, Reason: "EDGE index out of range"} - } - - word := binary.BigEndian.Uint32(layer.chunkExtraEdges[off : off+4]) - parentGlobal := word & commitgraph.ParentLastMask - - parentPos, err := reader.globalToPosition(parentGlobal) - if err != nil { - return nil, err - } - - out = append(out, parentPos) - - if word&commitgraph.ParentExtraMask != 0 { - break - } - - cur++ - } - - return out, nil -} |
