NewCommitPathIterFromIter returns a commit iterator which performs diffTree between successive trees returned from the commit iterator from the argument. The purpose of this is to find the commits that explain how the files that match the path came to be. If checkParent is true then the function dou
(pathFilter func(string) bool, commitIter CommitIter, checkParent bool)
| 21 | // is one of the parents in the tree (it's used by `git log --all`). |
| 22 | // pathFilter is a function that takes path of file as argument and returns true if we want it |
| 23 | func NewCommitPathIterFromIter(pathFilter func(string) bool, commitIter CommitIter, checkParent bool) CommitIter { |
| 24 | iterator := new(commitPathIter) |
| 25 | iterator.sourceIter = commitIter |
| 26 | iterator.pathFilter = pathFilter |
| 27 | iterator.checkParent = checkParent |
| 28 | return iterator |
| 29 | } |
| 30 | |
| 31 | // NewCommitFileIterFromIter is kept for compatibility, can be replaced with NewCommitPathIterFromIter |
| 32 | func NewCommitFileIterFromIter(fileName string, commitIter CommitIter, checkParent bool) CommitIter { |
no outgoing calls
searching dependent graphs…