MCPcopy Index your code
hub / github.com/devspace-sh/devspace / CalculateDelta

Method CalculateDelta

pkg/devspace/sync/initial.go:183–192  ·  view source on GitHub ↗
(remoteState map[string]*FileInformation, localState map[string]*FileInformation)

Source from the content-addressed store, hash-verified

181}
182
183func (i *initialSyncer) CalculateDelta(remoteState map[string]*FileInformation, localState map[string]*FileInformation) ([]*FileInformation, error) {
184 strategy := i.o.Strategy
185 if i.o.Strategy == latest.InitialSyncStrategyMirrorRemote {
186 strategy = latest.InitialSyncStrategyPreferRemote
187 } else if i.o.Strategy == latest.InitialSyncStrategyMirrorLocal {
188 strategy = latest.InitialSyncStrategyPreferLocal
189 }
190
191 return i.deltaState(remoteState, localState, strategy)
192}
193
194func (i *initialSyncer) deltaState(remoteState map[string]*FileInformation, localState map[string]*FileInformation, strategy latest.InitialSyncStrategy) ([]*FileInformation, error) {
195 changes := make([]*FileInformation, 0, 1024)

Callers 1

RunMethod · 0.95

Calls 1

deltaStateMethod · 0.95

Tested by

no test coverage detected