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

Method Next

plumbing/object/commit_walker_path.go:42–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40}
41
42func (c *commitPathIter) Next() (*Commit, error) {
43 if c.currentCommit == nil {
44 var err error
45 c.currentCommit, err = c.sourceIter.Next()
46 if err != nil {
47 return nil, err
48 }
49 }
50 commit, commitErr := c.getNextFileCommit()
51
52 // Setting current-commit to nil to prevent unwanted states when errors are raised
53 if commitErr != nil {
54 c.currentCommit = nil
55 }
56 return commit, commitErr
57}
58
59func (c *commitPathIter) getNextFileCommit() (*Commit, error) {
60 var parentTree, currentTree *Tree

Callers 1

ForEachMethod · 0.95

Calls 2

getNextFileCommitMethod · 0.95
NextMethod · 0.65

Tested by

no test coverage detected