MCPcopy
hub / github.com/git-lfs/git-lfs / Add

Method Add

tq/meter.go:111–119  ·  view source on GitHub ↗

Add tells the progress meter that a single file of the given size will possibly be transferred. If a file doesn't need to be transferred for some reason, be sure to call Skip(int64) with the same size.

(size int64)

Source from the content-addressed store, hash-verified

109// possibly be transferred. If a file doesn't need to be transferred for some
110// reason, be sure to call Skip(int64) with the same size.
111func (m *Meter) Add(size int64) {
112 if m == nil {
113 return
114 }
115
116 defer m.update(false)
117 atomic.AddInt32(&m.estimatedFiles, 1)
118 atomic.AddInt64(&m.estimatedBytes, size)
119}
120
121// Skip tells the progress meter that a file of size `size` is being skipped
122// because the transfer is unnecessary.

Callers 3

checkoutCommandFunction · 0.95
pullFunction · 0.95
buildTestDataFunction · 0.95

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected