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

Method shouldKeep

pkg/devspace/sync/downstream.go:211–225  ·  view source on GitHub ↗
(change *remote.Change)

Source from the content-addressed store, hash-verified

209}
210
211func (d *downstream) shouldKeep(change *remote.Change) bool {
212 // Is a delete change?
213 if change.ChangeType == remote.ChangeType_DELETE {
214 return shouldRemoveLocal(filepath.Join(d.sync.LocalPath, change.Path), parseFileInformation(change), d.sync, false)
215 }
216
217 // Exclude symlinks
218 // if fileInformation.IsSymbolicLink {
219 // Add them to the fileMap though
220 // d.config.fileIndex.fileMap[fileInformation.Name] = fileInformation
221 // }
222
223 // Should we download the file / folder?
224 return shouldDownload(change, d.sync)
225}
226
227func (d *downstream) applyChanges(changes []*remote.Change, force bool) error {
228 d.sync.log.Debugf("Downstream - Start applying %d changes", len(changes))

Callers 2

collectChangesMethod · 0.95
updateDownloadChangesMethod · 0.95

Calls 3

shouldRemoveLocalFunction · 0.85
parseFileInformationFunction · 0.85
shouldDownloadFunction · 0.85

Tested by

no test coverage detected