HasValidObjectIDLength returns true if `s` has a length that is a valid hexadecimal Git object ID length.
(s string)
| 128 | // HasValidObjectIDLength returns true if `s` has a length that is a valid |
| 129 | // hexadecimal Git object ID length. |
| 130 | func 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. |
no outgoing calls