mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 20:59:08 -04:00
feat(reference): add ability to compare references
This commit is contained in:
parent
1f0201d259
commit
7b6e0c36f6
3 changed files with 30 additions and 0 deletions
|
@ -381,6 +381,12 @@ Pointer<git_reference> setTargetSymbolic(
|
|||
}
|
||||
}
|
||||
|
||||
/// Compare two references.
|
||||
bool compare(Pointer<git_reference> ref1, Pointer<git_reference> ref2) {
|
||||
final result = libgit2.git_reference_cmp(ref1, ref2);
|
||||
return result == 0 ? true : false;
|
||||
}
|
||||
|
||||
/// Ensure the reference name is well-formed.
|
||||
///
|
||||
/// Valid reference names must follow one of two patterns:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue