Skip to content

Commit 8eb554c

Browse files
committed
BFS typofix
1 parent 6891968 commit 8eb554c

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

modules/zeta/object/commit_walker_bfs.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ type bfsCommitIterator struct {
1616
queue []*Commit
1717
}
1818

19-
// NewCommitIterBSF returns a CommitIter that walks the commit history,
19+
// NewCommitIterBFS returns a CommitIter that walks the commit history,
2020
// starting at the given commit and visiting its parents in pre-order.
2121
// The given callback will be called for each visited commit. Each commit will
2222
// be visited only once. If the callback returns an error, walking will stop
2323
// and will return the error. Other errors might be returned if the history
2424
// cannot be traversed (e.g. missing objects). Ignore allows to skip some
2525
// commits from being iterated.
26-
func NewCommitIterBSF(
26+
func NewCommitIterBFS(
2727
c *Commit,
2828
seenExternal map[plumbing.Hash]bool,
2929
ignore []plumbing.Hash,

modules/zeta/object/merge_base.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func ancestorsIndex(ctx context.Context, excluded, starting *Commit) (map[plumbi
7070
}
7171

7272
startingHistory := map[plumbing.Hash]struct{}{}
73-
startingIter := NewCommitIterBSF(starting, nil, nil)
73+
startingIter := NewCommitIterBFS(starting, nil, nil)
7474
err := startingIter.ForEach(ctx, func(commit *Commit) error {
7575
if commit.Hash == excluded.Hash {
7676
return errIsReachable

pkg/serve/protocol/pack.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ func (p *Packer) newCommitIter(ctx context.Context, current *object.Commit, deep
353353
}
354354
}
355355
}
356-
return object.NewCommitIterBSF(current, haves, nil)
356+
return object.NewCommitIterBFS(current, haves, nil)
357357
}
358358

359359
func (p *Packer) WriteDeepenMetadata(ctx context.Context, current *object.Commit, deepenFrom, have plumbing.Hash, deepen int) error {

pkg/zeta/log.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ func commitIterFunc(order LogOrder, ignore []plumbing.Hash) func(c *object.Commi
454454
}
455455
case LogOrderBFS:
456456
return func(c *object.Commit) object.CommitIter {
457-
return object.NewCommitIterBSF(c, nil, ignore)
457+
return object.NewCommitIterBFS(c, nil, ignore)
458458
}
459459
case LogOrderCommitterTime:
460460
return func(c *object.Commit) object.CommitIter {

pkg/zeta/odb/counting-objects.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func (o *ODB) CountingObjects(ctx context.Context, commit, deepenFrom plumbing.H
216216
haves := map[plumbing.Hash]bool{
217217
deepenFrom: true,
218218
}
219-
iter := object.NewCommitIterBSF(c, haves, nil)
219+
iter := object.NewCommitIterBFS(c, haves, nil)
220220
defer iter.Close()
221221
for {
222222
cc, err := iter.Next(ctx)

pkg/zeta/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ type LogOptions struct {
370370

371371
// The default traversal algorithm is Depth-first search
372372
// set Order=LogOrderCommitterTime for ordering by committer time (more compatible with `git log`)
373-
// set Order=LogOrderBSF for Breadth-first search
373+
// set Order=LogOrderBFS for Breadth-first search
374374
Order LogOrder
375375

376376
// Show only those commits in which the specified file was inserted/updated.

0 commit comments

Comments
 (0)