aboutsummaryrefslogtreecommitdiff
path: root/commitquery/query.go
blob: 315096c6baab5441c217c3a3013840f8804afc60 (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
23
package commitquery

import (
	commitgraphread "lindenii.org/go/furgit/format/commitgraph/read"
	objectfetch "lindenii.org/go/furgit/object/fetch"
	objectid "lindenii.org/go/furgit/object/id"
)

// query stores one mutable reusable worker and its cached node arena.
//
// Labels: MT-Unsafe.
type query struct {
	fetcher *objectfetch.Fetcher
	graph   *commitgraphread.Reader

	nodes []node

	byOID      map[objectid.ObjectID]nodeIndex
	byGraphPos map[commitgraphread.Position]nodeIndex

	markPhase uint32
	touched   []nodeIndex
}