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

Method addBlob

sizes/sizes.go:61–66  ·  view source on GitHub ↗

Record that the object has a blob of the specified `size` as a direct descendant.

(filename string, size BlobSize)

Source from the content-addressed store, hash-verified

59// Record that the object has a blob of the specified `size` as a
60// direct descendant.
61func (s *TreeSize) addBlob(filename string, size BlobSize) {
62 s.MaxPathDepth.AdjustMaxIfNecessary(1)
63 s.MaxPathLength.AdjustMaxIfNecessary(counts.NewCount32(uint64(len(filename))))
64 s.ExpandedBlobSize.Increment(counts.Count64(size.Size))
65 s.ExpandedBlobCount.Increment(1)
66}
67
68// Record that the object has a link as a direct descendant.
69func (s *TreeSize) addLink(filename string) {

Callers 1

initializeMethod · 0.80

Calls 4

NewCount32Function · 0.92
Count64TypeAlias · 0.92
AdjustMaxIfNecessaryMethod · 0.45
IncrementMethod · 0.45

Tested by

no test coverage detected