mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
feat(commit): add base bindings and api
This commit is contained in:
parent
696d55bb3a
commit
dc5f510aa5
12 changed files with 485 additions and 17 deletions
|
@ -4,11 +4,17 @@ import 'bindings/tree.dart' as bindings;
|
|||
import 'util.dart';
|
||||
|
||||
class Tree {
|
||||
/// Initializes a new instance of [Tree] class from provided
|
||||
/// pointer to tree object in memory.
|
||||
Tree(this._treePointer) {
|
||||
libgit2.git_libgit2_init();
|
||||
}
|
||||
|
||||
/// Initializes a new instance of [Tree] class from provided
|
||||
/// pointers to repository object and oid object in memory.
|
||||
///
|
||||
/// Should be freed with `free()` to release allocated memory.
|
||||
Tree(Pointer<git_repository> repo, Pointer<git_oid> id) {
|
||||
Tree.lookup(Pointer<git_repository> repo, Pointer<git_oid> id) {
|
||||
libgit2.git_libgit2_init();
|
||||
_treePointer = bindings.lookup(repo, id);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue