Package org.kiwiproject.beta.util.git
Class KiwiGit
java.lang.Object
org.kiwiproject.beta.util.git.KiwiGit
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanlooksLikeShortGitHash(String value) Check whether the given input value looks like it is a short Git hash.
-
Method Details
-
looksLikeShortGitHash
Check whether the given input value looks like it is a short Git hash.This method considers a short Git hash to be a 7-12 character long String containing only valid hexadecimal characters. Specifically, valid hexadecimal characters include digits
0-9and lowercase lettersa-f. We only look for lowercase letters because we have never once seen git display a commit hash with uppercase letters.Read more about Git Short SHA-1 hashes.
- Parameters:
value- the String to check- Returns:
- true if the input String looks like a short Git hash
-