mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
feat(reference): add ability to lookup reference by shorthand name
This commit is contained in:
parent
cfc6d0412b
commit
2170965ad8
4 changed files with 83 additions and 0 deletions
|
@ -227,6 +227,12 @@ class Repository {
|
|||
/// Throws a [LibGit2Error] if error occured.
|
||||
Reference getReference(String name) => Reference.lookup(_repoPointer, name);
|
||||
|
||||
/// Returns [Reference] object by lookingup a short [name] in repository.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
Reference getReferenceDWIM(String name) =>
|
||||
Reference.lookupDWIM(_repoPointer, name);
|
||||
|
||||
/// Checks if a reflog exists for the specified reference [name].
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue