20
21// HistoryDepth is the maximum number of commits the history engine walks. 0
22▶// means "entire history". Wired to --depth in main.go.
23var HistoryDepth = 1000
24
· · ·
142// pass user input unchecked. A degenerate window (from == to or to before
143// from) yields Width=0; all commits land in bucket 0 / N-1.
144▶func NewBucketing(from, to time.Time, n int) Bucketing {
145 if n <= 0 {
146 n = 1
· · ·
156// clamp to 0 (defensive — should not happen given the walk window). Times at
157// or after To clamp to N-1.
158▶func (b Bucketing) Index(t time.Time) int {
159 if b.N <= 0 {
160 return 0
· · ·
181// Start returns the wall-clock start time of bucket i. Indexes outside
182// [0, N) are clamped.
183▶func (b Bucketing) Start(i int) time.Time {
184 if b.N <= 0 {
185 return b.From
· · ·
195
196// emptySnapshot is what observers see when HEAD is missing or empty.
197▶func emptySnapshot() HeadSnapshot {
198 return HeadSnapshot{Files: map[string]HeadFile{}}
199}
+ 27 more matches in this file