MCPcopy Index your code
hub / github.com/sinclairtarget/git-who / SkipIgnored

Function SkipIgnored

internal/git/git.go:274–294  ·  view source on GitHub ↗

Returns an iterator over commits that skips any revs in the given list.

(
	commits iter.Seq[Commit],
	ignoreRevs []string,
)

Source from the content-addressed store, hash-verified

272
273// Returns an iterator over commits that skips any revs in the given list.
274func SkipIgnored(
275 commits iter.Seq[Commit],
276 ignoreRevs []string,
277) iter.Seq[Commit] {
278 ignoreSet := map[string]bool{}
279 for _, rev := range ignoreRevs {
280 ignoreSet[rev] = true
281 }
282
283 return func(yield func(Commit) bool) {
284 for commit := range commits {
285 if shouldIgnore := ignoreSet[commit.Hash]; shouldIgnore {
286 continue // skip this commit
287 }
288
289 if !yield(commit) {
290 break
291 }
292 }
293 }
294}

Callers 1

CommitsWithOptsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected