MCPcopy Create free account
hub / github.com/go-git/go-git / Peek

Method Peek

plumbing/object/commitgraph/commitnode_walker_helper.go:40–45  ·  view source on GitHub ↗

Peek returns the most recently added CommitNode from the stack without removing it

()

Source from the content-addressed store, hash-verified

38
39// Peek returns the most recently added CommitNode from the stack without removing it
40func (l *commitNodeLifo) Peek() (CommitNode, bool) {
41 if len(l.l) == 0 {
42 return nil, false
43 }
44 return l.l[len(l.l)-1], true
45}
46
47// Size returns the number of CommitNodes in the stack
48func (l *commitNodeLifo) Size() int {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected