MCPcopy Create free account
hub / github.com/go-git/go-git / composeIgnores

Function composeIgnores

plumbing/object/commitgraph/commitnode_walker_helper.go:143–164  ·  view source on GitHub ↗

composeIgnores composes the ignore list with the provided seenExternal list

(ignore []plumbing.Hash, seenExternal map[plumbing.Hash]bool)

Source from the content-addressed store, hash-verified

141
142// composeIgnores composes the ignore list with the provided seenExternal list
143func composeIgnores(ignore []plumbing.Hash, seenExternal map[plumbing.Hash]bool) map[plumbing.Hash]struct{} {
144 if len(ignore) == 0 {
145 seen := make(map[plumbing.Hash]struct{})
146 for h, ext := range seenExternal {
147 if ext {
148 seen[h] = struct{}{}
149 }
150 }
151 return seen
152 }
153
154 seen := make(map[plumbing.Hash]struct{})
155 for _, h := range ignore {
156 seen[h] = struct{}{}
157 }
158 for h, ext := range seenExternal {
159 if ext {
160 seen[h] = struct{}{}
161 }
162 }
163 return seen
164}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected