progress: remove progress.Noop()
This commit is contained in:
parent
622c7d3aea
commit
a54910552c
@ -1,27 +0,0 @@
|
||||
package progress
|
||||
|
||||
import "github.com/git-lfs/git-lfs/tasklog"
|
||||
|
||||
func Noop() Meter {
|
||||
return &nonMeter{
|
||||
updates: make(chan *tasklog.Update),
|
||||
}
|
||||
}
|
||||
|
||||
type nonMeter struct {
|
||||
updates chan *tasklog.Update
|
||||
}
|
||||
|
||||
func (m *nonMeter) Start() {}
|
||||
func (m *nonMeter) Pause() {}
|
||||
func (m *nonMeter) Add(size int64) {}
|
||||
func (m *nonMeter) Skip(size int64) {}
|
||||
func (m *nonMeter) StartTransfer(name string) {}
|
||||
func (m *nonMeter) TransferBytes(direction, name string, read, total int64, current int) {}
|
||||
func (m *nonMeter) FinishTransfer(name string) {}
|
||||
func (m *nonMeter) Finish() {
|
||||
close(m.updates)
|
||||
}
|
||||
|
||||
func (m *nonMeter) Updates() <-chan *tasklog.Update { return m.updates }
|
||||
func (m *nonMeter) Throttled() bool { return false }
|
@ -226,11 +226,6 @@ func NewTransferQueue(dir Direction, manifest *Manifest, remote string, options
|
||||
}
|
||||
|
||||
q.incoming = make(chan *objectTuple, q.bufferDepth)
|
||||
|
||||
if q.meter == nil {
|
||||
q.meter = progress.Noop()
|
||||
}
|
||||
|
||||
q.collectorWait.Add(1)
|
||||
q.errorwait.Add(1)
|
||||
q.run()
|
||||
|
Loading…
Reference in New Issue
Block a user