(filename string, s2 TreeSize)
| 41 | } |
| 42 | |
| 43 | func (s *TreeSize) addDescendent(filename string, s2 TreeSize) { |
| 44 | s.MaxPathDepth.AdjustMaxIfNecessary(s2.MaxPathDepth.Plus(1)) |
| 45 | if s2.MaxPathLength > 0 { |
| 46 | s.MaxPathLength.AdjustMaxIfNecessary( |
| 47 | (counts.NewCount32(uint64(len(filename))) + 1).Plus(s2.MaxPathLength), |
| 48 | ) |
| 49 | } else { |
| 50 | s.MaxPathLength.AdjustMaxIfNecessary(counts.NewCount32(uint64(len(filename)))) |
| 51 | } |
| 52 | s.ExpandedTreeCount.Increment(s2.ExpandedTreeCount) |
| 53 | s.ExpandedBlobCount.Increment(s2.ExpandedBlobCount) |
| 54 | s.ExpandedBlobSize.Increment(s2.ExpandedBlobSize) |
| 55 | s.ExpandedLinkCount.Increment(s2.ExpandedLinkCount) |
| 56 | s.ExpandedSubmoduleCount.Increment(s2.ExpandedSubmoduleCount) |
| 57 | } |
| 58 | |
| 59 | // Record that the object has a blob of the specified `size` as a |
| 60 | // direct descendant. |
no test coverage detected