MCPcopy
hub / github.com/harness/harness / String

Method String

git/api/tree.go:88–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

86)
87
88func (m TreeNodeMode) String() string {
89 var result int
90 switch m {
91 case TreeNodeModeFile:
92 result = 0o100644
93 case TreeNodeModeSymlink:
94 result = 0o120000
95 case TreeNodeModeExec:
96 result = 0o100755
97 case TreeNodeModeTree:
98 result = 0o040000
99 case TreeNodeModeCommit:
100 result = 0o160000
101 }
102 return strconv.FormatInt(int64(result), 8)
103}
104
105func cleanTreePath(treePath string) string {
106 return strings.Trim(path.Clean("/"+treePath), "/")

Callers 15

catFileObjectsFunction · 0.45
CatFileCommitsFunction · 0.45
catFileAnnotatedTagsFunction · 0.45
ResolveRevMethod · 0.45
lsTreeFunction · 0.45
GetTreeNodeFunction · 0.45
HasBranchesMethod · 0.45
RawDiffMethod · 0.45
DiffShortStatMethod · 0.45
GetDiffShortStatFunction · 0.45
parseDiffStderrFunction · 0.45

Calls

no outgoing calls

Tested by 1