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

Method Pop

plumbing/object/commitgraph/commitnode_walker_helper.go:30–37  ·  view source on GitHub ↗

Pop pops the most recently added CommitNode from the stack

()

Source from the content-addressed store, hash-verified

28
29// Pop pops the most recently added CommitNode from the stack
30func (l *commitNodeLifo) Pop() (CommitNode, bool) {
31 if len(l.l) == 0 {
32 return nil, false
33 }
34 c := l.l[len(l.l)-1]
35 l.l = l.l[:len(l.l)-1]
36 return c, true
37}
38
39// Peek returns the most recently added CommitNode from the stack without removing it
40func (l *commitNodeLifo) Peek() (CommitNode, bool) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected