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
· · ·
141// pass user input unchecked. A degenerate window (from == to or to before
142// from) yields Width=0; all commits land in bucket 0 / N-1.
143▶func NewBucketing(from, to time.Time, n int) Bucketing {
144 if n <= 0 {
145 n = 1
· · ·
155// clamp to 0 (defensive — should not happen given the walk window). Times at
156// or after To clamp to N-1.
157▶func (b Bucketing) Index(t time.Time) int {
158 if b.N <= 0 {
159 return 0
· · ·
180// Start returns the wall-clock start time of bucket i. Indexes outside
181// [0, N) are clamped.
182▶func (b Bucketing) Start(i int) time.Time {
183 if b.N <= 0 {
184 return b.From
· · ·
194
195// emptySnapshot is what observers see when HEAD is missing or empty.
196▶func emptySnapshot() HeadSnapshot {
197 return HeadSnapshot{Files: map[string]HeadFile{}}
198}
+ 26 more matches in this file