MCPcopy Index your code
hub / github.com/git-lfs/git-lfs / HasValidObjectIDLength

Function HasValidObjectIDLength

git/git.go:130–137  ·  view source on GitHub ↗

HasValidObjectIDLength returns true if `s` has a length that is a valid hexadecimal Git object ID length.

(s string)

Source from the content-addressed store, hash-verified

128// HasValidObjectIDLength returns true if `s` has a length that is a valid
129// hexadecimal Git object ID length.
130func HasValidObjectIDLength(s string) bool {
131 for _, length := range ObjectIDLengths {
132 if len(s) == length {
133 return true
134 }
135 }
136 return false
137}
138
139// IsZeroObjectID returns true if the string is a valid hexadecimal Git object
140// ID and represents the all-zeros object ID for some hash algorithm.

Callers 3

runCatFileBatchFunction · 0.92
LocalRefsFunction · 0.85

Calls

no outgoing calls

Tested by 1