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

Method Swap

worktree_commit.go:241–241  ·  view source on GitHub ↗
(i int, j int)

Source from the content-addressed store, hash-verified

239func (se sortableEntries) Len() int { return len(se) }
240func (se sortableEntries) Less(i int, j int) bool { return se.sortName(se[i]) < se.sortName(se[j]) }
241func (se sortableEntries) Swap(i int, j int) { se[i], se[j] = se[j], se[i] }
242
243func (h *buildTreeHelper) copyTreeToStorageRecursive(parent string, t *object.Tree) (plumbing.Hash, error) {
244 sort.Sort(sortableEntries(t.Entries))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected