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

Function deduplicateFiles

apps/cli/internal/taskcontext/resolve.go:142–153  ·  view source on GitHub ↗

deduplicateFiles removes duplicate paths, keeping the first occurrence.

(files []FileEntry)

Source from the content-addressed store, hash-verified

140
141// deduplicateFiles removes duplicate paths, keeping the first occurrence.
142func deduplicateFiles(files []FileEntry) []FileEntry {
143 seen := make(map[string]bool, len(files))
144 var result []FileEntry
145 for _, f := range files {
146 if seen[f.Path] {
147 continue
148 }
149 seen[f.Path] = true
150 result = append(result, f)
151 }
152 return result
153}
154
155// checkExistence stats each file path relative to projectRoot and sets Exists and IsDir.
156func checkExistence(files []FileEntry, projectRoot string) {

Callers 1

ResolveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected