diff --git a/lib/src/commit.dart b/lib/src/commit.dart index 162a9cf..52ac032 100644 --- a/lib/src/commit.dart +++ b/lib/src/commit.dart @@ -23,7 +23,6 @@ class Commit { /// /// Should be freed with `free()` to release allocated memory. Commit.lookup(Repository repo, Oid oid) { - libgit2.git_libgit2_init(); _commitPointer = bindings.lookup(repo.pointer, oid.pointer); } diff --git a/lib/src/oid.dart b/lib/src/oid.dart index c241e84..43c5e7a 100644 --- a/lib/src/oid.dart +++ b/lib/src/oid.dart @@ -17,7 +17,6 @@ class Oid { /// /// Throws a [LibGit2Error] if error occured. Oid.fromSHA(Repository repository, String sha) { - libgit2.git_libgit2_init(); if (sha.length == 40) { _oidPointer = bindings.fromSHA(sha); } else { diff --git a/lib/src/reference.dart b/lib/src/reference.dart index 5c80c9d..1321687 100644 --- a/lib/src/reference.dart +++ b/lib/src/reference.dart @@ -38,9 +38,7 @@ class References { class Reference { /// Initializes a new instance of the [Reference] class. /// Should be freed with `free()` to release allocated memory. - Reference(this._repoPointer, this._refPointer) { - libgit2.git_libgit2_init(); - } + Reference(this._repoPointer, this._refPointer); /// Initializes a new instance of the [Reference] class by creating a new direct reference. /// diff --git a/lib/src/revwalk.dart b/lib/src/revwalk.dart index e511e35..433f084 100644 --- a/lib/src/revwalk.dart +++ b/lib/src/revwalk.dart @@ -5,13 +5,11 @@ import 'commit.dart'; import 'oid.dart'; import 'repository.dart'; import 'enums.dart'; -import 'util.dart'; class RevWalk { /// Initializes a new instance of the [RevWalk] class. /// Should be freed with `free()` to release allocated memory. RevWalk(Repository repo) { - libgit2.git_libgit2_init(); _revWalkPointer = bindings.create(repo.pointer); } diff --git a/lib/src/tree.dart b/lib/src/tree.dart index 1fb9c68..211f3ae 100644 --- a/lib/src/tree.dart +++ b/lib/src/tree.dart @@ -18,7 +18,6 @@ class Tree { /// /// Should be freed with `free()` to release allocated memory. Tree.lookup(Repository repo, Oid id) { - libgit2.git_libgit2_init(); _treePointer = bindings.lookup(repo.pointer, id.pointer); }