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

Function NewCommitPathIterFromIter

plumbing/object/commit_walker_path.go:23–29  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
23func 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
32func NewCommitFileIterFromIter(fileName string, commitIter CommitIter, checkParent bool) CommitIter {

Callers 6

TestLogPathWithErrorMethod · 0.92
logWithFileMethod · 0.92
logWithPathFilterMethod · 0.92

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…