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

Method ForEach

plumbing/object/commit_walker_bfs.go:78–98  ·  view source on GitHub ↗
(cb func(*Commit) error)

Source from the content-addressed store, hash-verified

76}
77
78func (w *bfsCommitIterator) ForEach(cb func(*Commit) error) error {
79 for {
80 c, err := w.Next()
81 if err == io.EOF {
82 break
83 }
84 if err != nil {
85 return err
86 }
87
88 err = cb(c)
89 if err == storer.ErrStop {
90 break
91 }
92 if err != nil {
93 return err
94 }
95 }
96
97 return nil
98}
99
100func (w *bfsCommitIterator) Close() {}

Callers

nothing calls this directly

Calls 1

NextMethod · 0.95

Tested by

no test coverage detected