mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 12:49:08 -04:00
feat(reference): add ability to create direct reference
This commit is contained in:
parent
6643527f2d
commit
9190ed2e0f
16 changed files with 669 additions and 60 deletions
|
@ -24,8 +24,19 @@ class Oid {
|
|||
}
|
||||
}
|
||||
|
||||
/// Initializes a new instance of [Oid] class from provided
|
||||
/// hexadecimal [sha] string that is lesser than 40 characters long.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
Oid.fromSHAn(String sha) {
|
||||
libgit2.git_libgit2_init();
|
||||
_oidPointer = bindings.fromStrN(sha);
|
||||
}
|
||||
|
||||
late final Pointer<git_oid> _oidPointer;
|
||||
|
||||
/// Pointer to memory address for allocated oid object.
|
||||
late Pointer<git_oid> _oidPointer;
|
||||
Pointer<git_oid> get pointer => _oidPointer;
|
||||
|
||||
/// Returns hexadecimal SHA-1 string.
|
||||
String get sha {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue