diff options
| author | 2026-03-06 08:05:51 +0800 | |
|---|---|---|
| committer | 2026-03-06 10:00:35 +0800 | |
| commit | e15054a4f93fc54806e84aa7036e60168e78e823 (patch) | |
| tree | b576dcb1d3368324e7ca73ca0fe79dd8865c5524 /format/commitgraph/commits.go | |
| parent | internal/intconv: Add Uint32ToUint8 (diff) | |
| signature | No signature | |
format/commitgraph: Add initial commit-graph support
Diffstat (limited to 'format/commitgraph/commits.go')
| -rw-r--r-- | format/commitgraph/commits.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/format/commitgraph/commits.go b/format/commitgraph/commits.go new file mode 100644 index 00000000..0f5313e9 --- /dev/null +++ b/format/commitgraph/commits.go @@ -0,0 +1,20 @@ +package commitgraph + +import "codeberg.org/lindenii/furgit/objectid" + +// Commit stores decoded commit-graph record data. +type Commit struct { + OID objectid.ObjectID + TreeOID objectid.ObjectID + Parent1 ParentRef + Parent2 ParentRef + ExtraParents []Position + CommitTimeUnix int64 + GenerationV1 uint32 + GenerationV2 uint64 +} + +// NumCommits returns total commits across loaded layers. +func (reader *Reader) NumCommits() uint32 { + return reader.total +} |
