(oid git.OID)
| 638 | } |
| 639 | |
| 640 | func (g *Graph) GetCommitSize(oid git.OID) CommitSize { |
| 641 | g.commitLock.Lock() |
| 642 | |
| 643 | size, ok := g.commitSizes[oid] |
| 644 | if !ok { |
| 645 | panic("commit is not available") |
| 646 | } |
| 647 | g.commitLock.Unlock() |
| 648 | |
| 649 | return size |
| 650 | } |
| 651 | |
| 652 | // Record that the specified `oid` is the specified `commit`. |
| 653 | func (g *Graph) RegisterCommit(oid git.OID, commit *git.Commit) { |