aboutsummaryrefslogtreecommitdiff
path: root/format/commitgraph/read/commits.go
blob: e0a299e799606c95e6fa46463fbe987be9af4b33 (about) (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package read

import objectid "codeberg.org/lindenii/furgit/object/id"

// 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.
//
// Labels: MT-Safe.
func (reader *Reader) NumCommits() uint32 {
	return reader.total
}