MCPcopy
hub / github.com/github/git-sizer / GetBlobSize

Method GetBlobSize

sizes/graph.go:442–449  ·  view source on GitHub ↗

The `Require*Size` functions behave as follows: * If the size of the object with name `oid` is already known. In this case, return true as the second value. * If the size of the object is not yet known, then register the listener to be informed some time in the future when the size is known. In th

(oid git.OID)

Source from the content-addressed store, hash-verified

440// known. In this case, return false as the second value.
441
442func (g *Graph) GetBlobSize(oid git.OID) BlobSize {
443 // See if we already know the size:
444 size, ok := g.blobSizes[oid]
445 if !ok {
446 panic("blob size not known")
447 }
448 return size
449}
450
451func (g *Graph) RequireTreeSize(oid git.OID, listener func(TreeSize)) (TreeSize, bool) {
452 g.treeLock.Lock()

Callers 1

initializeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected