MCPcopy Index your code
hub / github.com/kptdev/kpt / shortSha

Function shortSha

internal/util/diff/diff.go:346–348  ·  view source on GitHub ↗

shortSha returns a shortened version of a commit SHA

(sha string)

Source from the content-addressed store, hash-verified

344
345// shortSha returns a shortened version of a commit SHA
346func shortSha(sha string) string {
347 return sha[0:int(math.Min(float64(len(sha)), 7))]
348}
349
350// stageDirectory creates a subdirectory of the provided path for temporary operations
351// path is the parent staged directory and should already exist

Callers 1

NameStagingDirectoryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected