mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor: pass repository object to arguments instead of pointer
This commit is contained in:
parent
94b4116adf
commit
e0e3742457
6 changed files with 45 additions and 26 deletions
|
@ -18,13 +18,13 @@ class Commit {
|
|||
libgit2.git_libgit2_init();
|
||||
}
|
||||
|
||||
/// Initializes a new instance of [Commit] class from provided pointer to [Repository]
|
||||
/// object in memory and pointer to [Oid] object in memory.
|
||||
/// Initializes a new instance of [Commit] class from provided [Repository]
|
||||
/// and [Oid] objects.
|
||||
///
|
||||
/// Should be freed with `free()` to release allocated memory.
|
||||
Commit.lookup(Pointer<git_repository> repo, Pointer<git_oid> oid) {
|
||||
Commit.lookup(Repository repo, Oid oid) {
|
||||
libgit2.git_libgit2_init();
|
||||
_commitPointer = bindings.lookup(repo, oid);
|
||||
_commitPointer = bindings.lookup(repo.pointer, oid.pointer);
|
||||
}
|
||||
|
||||
/// Pointer to memory address for allocated commit object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue