fork of go-git with some jj specific features
at v5.13.2 14 lines 274 B view raw
1package reference 2 3import ( 4 "sort" 5 6 "github.com/go-git/go-git/v5/plumbing" 7) 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}