MCPcopy Index your code
hub / github.com/go-git/go-git / ForEach

Method ForEach

plumbing/object/commit_walker.go:95–115  ·  view source on GitHub ↗
(cb func(*Commit) error)

Source from the content-addressed store, hash-verified

93}
94
95func (w *commitPreIterator) ForEach(cb func(*Commit) error) error {
96 for {
97 c, err := w.Next()
98 if err == io.EOF {
99 break
100 }
101 if err != nil {
102 return err
103 }
104
105 err = cb(c)
106 if err == storer.ErrStop {
107 break
108 }
109 if err != nil {
110 return err
111 }
112 }
113
114 return nil
115}
116
117func (w *commitPreIterator) Close() {}
118

Callers

nothing calls this directly

Calls 1

NextMethod · 0.95

Tested by

no test coverage detected