MCPcopy Index your code
hub / github.com/jetify-com/devbox / isGitHash

Function isGitHash

nix/flake/flakeref.go:484–496  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

482}
483
484func isGitHash(s string) bool {
485 if len(s) != 40 {
486 return false
487 }
488 for i := range s {
489 isDigit := s[i] >= '0' && s[i] <= '9'
490 isHexLetter := s[i] >= 'a' && s[i] <= 'f'
491 if !isDigit && !isHexLetter {
492 return false
493 }
494 }
495 return true
496}
497
498func isArchive(path string) bool {
499 // As documented under the tarball type:

Callers 2

parseURLRefFunction · 0.85
parseGitHubRefFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected