mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-04 20:29:08 -04:00
feat(reference): add ability to set target
This commit is contained in:
parent
58fa54f24a
commit
371d52b7f8
5 changed files with 147 additions and 15 deletions
|
@ -19,3 +19,9 @@ DynamicLibrary loadLibrary() {
|
|||
}
|
||||
|
||||
final libgit2 = Libgit2(loadLibrary());
|
||||
|
||||
bool isValidShaHex(String str) {
|
||||
final hexRegExp = RegExp(r'^[0-9a-fA-F]+$');
|
||||
return hexRegExp.hasMatch(str) &&
|
||||
(GIT_OID_MINPREFIXLEN <= str.length && GIT_OID_HEXSZ >= str.length);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue