aboutsummaryrefslogtreecommitdiff
path: root/format/commitgraph/reader.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-06 08:05:51 +0800
committerGravatar Runxi Yu2026-03-06 10:00:35 +0800
commite15054a4f93fc54806e84aa7036e60168e78e823 (patch)
treeb576dcb1d3368324e7ca73ca0fe79dd8865c5524 /format/commitgraph/reader.go
parentinternal/intconv: Add Uint32ToUint8 (diff)
signatureNo signature
format/commitgraph: Add initial commit-graph support
Diffstat (limited to 'format/commitgraph/reader.go')
-rw-r--r--format/commitgraph/reader.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/format/commitgraph/reader.go b/format/commitgraph/reader.go
new file mode 100644
index 00000000..b7af3282
--- /dev/null
+++ b/format/commitgraph/reader.go
@@ -0,0 +1,14 @@
+package commitgraph
+
+import "codeberg.org/lindenii/furgit/objectid"
+
+// Reader provides read-only access to one mmap-backed commit-graph snapshot.
+//
+// It is safe for concurrent read-only queries.
+type Reader struct {
+ algo objectid.Algorithm
+ hashVersion uint8
+
+ layers []layer
+ total uint32
+}