RegisterReference records the specified reference in `g`.
(ref git.Reference, walked bool, groups []RefGroupSymbol)
| 385 | |
| 386 | // RegisterReference records the specified reference in `g`. |
| 387 | func (g *Graph) RegisterReference(ref git.Reference, walked bool, groups []RefGroupSymbol) { |
| 388 | g.historyLock.Lock() |
| 389 | g.historySize.recordReference(g, ref) |
| 390 | for _, group := range groups { |
| 391 | g.historySize.recordReferenceGroup(g, group) |
| 392 | } |
| 393 | g.historyLock.Unlock() |
| 394 | |
| 395 | if walked { |
| 396 | g.pathResolver.RecordReference(ref) |
| 397 | } |
| 398 | } |
| 399 | |
| 400 | // HistorySize returns the size data that have been collected. |
| 401 | func (g *Graph) HistorySize() HistorySize { |
no test coverage detected