(fun RevWalkIterator)
| 180 | type RevWalkIterator func(commit *Commit) bool |
| 181 | |
| 182 | func (v *RevWalk) Iterate(fun RevWalkIterator) (err error) { |
| 183 | oid := new(Oid) |
| 184 | for { |
| 185 | err = v.Next(oid) |
| 186 | if IsErrorCode(err, ErrorCodeIterOver) { |
| 187 | return nil |
| 188 | } |
| 189 | if err != nil { |
| 190 | return err |
| 191 | } |
| 192 | |
| 193 | commit, err := v.repo.LookupCommit(oid) |
| 194 | if err != nil { |
| 195 | return err |
| 196 | } |
| 197 | |
| 198 | cont := fun(commit) |
| 199 | if !cont { |
| 200 | break |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | return nil |
| 205 | } |
| 206 | |
| 207 | func (v *RevWalk) SimplifyFirstParent() { |
| 208 | C.git_revwalk_simplify_first_parent(v.ptr) |
nothing calls this directly
no test coverage detected