aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/object')
-rw-r--r--plumbing/object/commit_walker.go8
-rw-r--r--plumbing/object/commit_walker_test.go4
2 files changed, 6 insertions, 6 deletions
diff --git a/plumbing/object/commit_walker.go b/plumbing/object/commit_walker.go
index 3316fab..8d2c6e8 100644
--- a/plumbing/object/commit_walker.go
+++ b/plumbing/object/commit_walker.go
@@ -13,13 +13,13 @@ type commitPreIterator struct {
start *Commit
}
-// NewCommitPreIterator returns a CommitIter that walks the commit history,
+// NewCommitPreorderIter returns a CommitIter that walks the commit history,
// starting at the given commit and visiting its parents in pre-order.
// The given callback will be called for each visited commit. Each commit will
// be visited only once. If the callback returns an error, walking will stop
// and will return the error. Other errors might be returned if the history
// cannot be traversed (e.g. missing objects).
-func NewCommitPreIterator(c *Commit) CommitIter {
+func NewCommitPreorderIter(c *Commit) CommitIter {
return &commitPreIterator{
seen: make(map[plumbing.Hash]bool),
stack: make([]CommitIter, 0),
@@ -94,12 +94,12 @@ type commitPostIterator struct {
seen map[plumbing.Hash]bool
}
-// NewCommitPostIterator returns a CommitIter that walks the commit
+// 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 order.
-func NewCommitPostIterator(c *Commit) CommitIter {
+func NewCommitPostorderIter(c *Commit) CommitIter {
return &commitPostIterator{
stack: []*Commit{c},
seen: make(map[plumbing.Hash]bool),
diff --git a/plumbing/object/commit_walker_test.go b/plumbing/object/commit_walker_test.go
index 7d04bce..2a03057 100644
--- a/plumbing/object/commit_walker_test.go
+++ b/plumbing/object/commit_walker_test.go
@@ -12,7 +12,7 @@ func (s *CommitWalkerSuite) TestCommitPreIterator(c *C) {
commit := s.commit(c, s.Fixture.Head)
var commits []*Commit
- wIter := NewCommitPreIterator(commit)
+ wIter := NewCommitPreorderIter(commit)
wIter.ForEach(func(c *Commit) error {
commits = append(commits, c)
return nil
@@ -39,7 +39,7 @@ func (s *CommitWalkerSuite) TestCommitPostIterator(c *C) {
commit := s.commit(c, s.Fixture.Head)
var commits []*Commit
- wIter := NewCommitPostIterator(commit)
+ wIter := NewCommitPostorderIter(commit)
wIter.ForEach(func(c *Commit) error {
commits = append(commits, c)
return nil