MCPcopy
hub / github.com/go-git/go-git / treeEntrySortName

Function treeEntrySortName

plumbing/object/tree.go:362–367  ·  view source on GitHub ↗

Git compares tree entries as if directory names had a trailing slash.

(e *TreeEntry)

Source from the content-addressed store, hash-verified

360
361// Git compares tree entries as if directory names had a trailing slash.
362func treeEntrySortName(e *TreeEntry) string {
363 if e.Mode == filemode.Dir {
364 return e.Name + "/"
365 }
366 return e.Name
367}
368
369func canonicalTreeMode(mode filemode.FileMode) filemode.FileMode {
370 switch mode & 0o170000 {

Callers 4

entryMethod · 0.85
searchEntryIndexMethod · 0.85
DecodeMethod · 0.85
LessMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…