NewCommitPostorderIter returns a CommitIter that walks the commit history like WalkCommitHistory but in post-order. This means that after walking a merge commit, the merged commit will be walked before the base it was merged on. This can be useful if you wish to see the history in chronological orde
(c *Commit, ignore []plumbing.Hash)
| 127 | // it was merged on. This can be useful if you wish to see the history in |
| 128 | // chronological order. Ignore allows to skip some commits from being iterated. |
| 129 | func NewCommitPostorderIter(c *Commit, ignore []plumbing.Hash) CommitIter { |
| 130 | seen := make(map[plumbing.Hash]bool) |
| 131 | for _, h := range ignore { |
| 132 | seen[h] = true |
| 133 | } |
| 134 | |
| 135 | return &commitPostIterator{ |
| 136 | stack: []*Commit{c}, |
| 137 | seen: seen, |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func (w *commitPostIterator) Next() (*Commit, error) { |
| 142 | for { |
no outgoing calls
searching dependent graphs…