MCPcopy Create free account
hub / github.com/driangle/taskmd / mergeFiles

Function mergeFiles

apps/cli/internal/cli/context.go:128–141  ·  view source on GitHub ↗

mergeFiles appends src files into dst, deduplicating by path.

(dst, src []taskcontext.FileEntry)

Source from the content-addressed store, hash-verified

126
127// mergeFiles appends src files into dst, deduplicating by path.
128func mergeFiles(dst, src []taskcontext.FileEntry) []taskcontext.FileEntry {
129 seen := make(map[string]bool, len(dst))
130 for _, f := range dst {
131 seen[f.Path] = true
132 }
133 for _, f := range src {
134 if seen[f.Path] {
135 continue
136 }
137 seen[f.Path] = true
138 dst = append(dst, f)
139 }
140 return dst
141}
142
143// addDependencyEntries populates the Dependencies field on the result.
144func addDependencyEntries(task *model.Task, allTasks []*model.Task, result *taskcontext.Result) {

Callers 1

mergeDependencyFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected