mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
feat(reference): add ability to get shorthand name of reference
This commit is contained in:
parent
371d52b7f8
commit
a1884b4dac
3 changed files with 30 additions and 1 deletions
|
@ -165,6 +165,12 @@ class Reference {
|
|||
/// Returns the full name of a reference.
|
||||
String get name => bindings.name(_refPointer);
|
||||
|
||||
/// Returns the reference's short name.
|
||||
///
|
||||
/// This will transform the reference name into a name "human-readable" version.
|
||||
/// If no shortname is appropriate, it will return the full name.
|
||||
String get shorthand => bindings.shorthand(_refPointer);
|
||||
|
||||
/// Returns a list with all the references that can be found in a repository.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue