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

Function Sort

internal/reference/sort.go:10–14  ·  view source on GitHub ↗

Sort sorts the references by name to ensure a consistent order.

(refs []*plumbing.Reference)

Source from the content-addressed store, hash-verified

8
9// Sort sorts the references by name to ensure a consistent order.
10func Sort(refs []*plumbing.Reference) {
11 sort.Slice(refs, func(i, j int) bool {
12 return refs[i].Name() < refs[j].Name()
13 })
14}

Callers 1

UpdateServerInfoFunction · 0.92

Calls 1

NameMethod · 0.65

Tested by

no test coverage detected