ref: 803089a76171db1dd5b891fb6dfa1b7e7f3d50d2
dir: /commitquery/node.go/
package commitquery
import (
commitgraphread "codeberg.org/lindenii/furgit/commitgraph/read"
"codeberg.org/lindenii/furgit/objectid"
)
// nodeIndex identifies one internal query node.
type nodeIndex int
// node stores one mutable commit traversal node.
type node struct {
id objectid.ObjectID
parents []nodeIndex
commitTime int64
generation uint64
hasGeneration bool
hasGraphPos bool
loaded bool
graphPos commitgraphread.Position
marks markBits
touchedPhase uint32
}
// newNode allocates one empty internal node.
func (query *Query) newNode(id objectid.ObjectID) nodeIndex {
count := len(query.nodes)
idx := nodeIndex(count)
query.nodes = append(query.nodes, node{id: id})
return idx
}