mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
test: improve coverage
This commit is contained in:
parent
d75acbfdd3
commit
d6eae1e9ed
71 changed files with 710 additions and 229 deletions
|
@ -21,7 +21,16 @@ Pointer<git_diff> indexToWorkdir({
|
|||
interhunkLines: interhunkLines,
|
||||
);
|
||||
|
||||
libgit2.git_diff_index_to_workdir(out, repoPointer, indexPointer, opts);
|
||||
final error = libgit2.git_diff_index_to_workdir(
|
||||
out,
|
||||
repoPointer,
|
||||
indexPointer,
|
||||
opts,
|
||||
);
|
||||
|
||||
if (error < 0) {
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
}
|
||||
|
||||
calloc.free(opts);
|
||||
|
||||
|
@ -46,7 +55,7 @@ Pointer<git_diff> treeToIndex({
|
|||
interhunkLines: interhunkLines,
|
||||
);
|
||||
|
||||
libgit2.git_diff_tree_to_index(
|
||||
final error = libgit2.git_diff_tree_to_index(
|
||||
out,
|
||||
repoPointer,
|
||||
treePointer,
|
||||
|
@ -54,6 +63,10 @@ Pointer<git_diff> treeToIndex({
|
|||
opts,
|
||||
);
|
||||
|
||||
if (error < 0) {
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
}
|
||||
|
||||
calloc.free(opts);
|
||||
|
||||
return out.value;
|
||||
|
@ -76,7 +89,16 @@ Pointer<git_diff> treeToWorkdir({
|
|||
interhunkLines: interhunkLines,
|
||||
);
|
||||
|
||||
libgit2.git_diff_tree_to_workdir(out, repoPointer, treePointer, opts);
|
||||
final error = libgit2.git_diff_tree_to_workdir(
|
||||
out,
|
||||
repoPointer,
|
||||
treePointer,
|
||||
opts,
|
||||
);
|
||||
|
||||
if (error < 0) {
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
}
|
||||
|
||||
calloc.free(opts);
|
||||
|
||||
|
@ -101,7 +123,7 @@ Pointer<git_diff> treeToTree({
|
|||
interhunkLines: interhunkLines,
|
||||
);
|
||||
|
||||
libgit2.git_diff_tree_to_tree(
|
||||
final error = libgit2.git_diff_tree_to_tree(
|
||||
out,
|
||||
repoPointer,
|
||||
oldTreePointer,
|
||||
|
@ -109,6 +131,10 @@ Pointer<git_diff> treeToTree({
|
|||
opts,
|
||||
);
|
||||
|
||||
if (error < 0) {
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
}
|
||||
|
||||
calloc.free(opts);
|
||||
|
||||
return out.value;
|
||||
|
@ -351,15 +377,18 @@ Pointer<git_diff_options> _diffOptionsInit({
|
|||
required int interhunkLines,
|
||||
}) {
|
||||
final opts = calloc<git_diff_options>();
|
||||
final optsError =
|
||||
libgit2.git_diff_options_init(opts, GIT_DIFF_OPTIONS_VERSION);
|
||||
opts.ref.flags = flags;
|
||||
opts.ref.context_lines = contextLines;
|
||||
opts.ref.interhunk_lines = interhunkLines;
|
||||
final optsError = libgit2.git_diff_options_init(
|
||||
opts,
|
||||
GIT_DIFF_OPTIONS_VERSION,
|
||||
);
|
||||
|
||||
if (optsError < 0) {
|
||||
calloc.free(opts);
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
} else {
|
||||
opts.ref.flags = flags;
|
||||
opts.ref.context_lines = contextLines;
|
||||
opts.ref.interhunk_lines = interhunkLines;
|
||||
return opts;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -120,16 +120,16 @@ void merge({
|
|||
String mergeFileFromIndex({
|
||||
required Pointer<git_repository> repoPointer,
|
||||
required Pointer<git_index_entry>? ancestorPointer,
|
||||
required Pointer<git_index_entry>? oursPointer,
|
||||
required Pointer<git_index_entry>? theirsPointer,
|
||||
required Pointer<git_index_entry> oursPointer,
|
||||
required Pointer<git_index_entry> theirsPointer,
|
||||
}) {
|
||||
final out = calloc<git_merge_file_result>();
|
||||
final error = libgit2.git_merge_file_from_index(
|
||||
out,
|
||||
repoPointer,
|
||||
ancestorPointer ?? nullptr,
|
||||
oursPointer ?? nullptr,
|
||||
theirsPointer ?? nullptr,
|
||||
oursPointer,
|
||||
theirsPointer,
|
||||
nullptr,
|
||||
);
|
||||
|
||||
|
|
|
@ -235,6 +235,8 @@ bool isTag(Pointer<git_reference> ref) {
|
|||
///
|
||||
/// The message for the reflog will be ignored if the reference does not belong in the
|
||||
/// standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
Pointer<git_reference> createDirect({
|
||||
required Pointer<git_repository> repoPointer,
|
||||
required String name,
|
||||
|
@ -288,6 +290,8 @@ Pointer<git_reference> createDirect({
|
|||
///
|
||||
/// The message for the reflog will be ignored if the reference does not belong in the standard
|
||||
/// set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
Pointer<git_reference> createSymbolic({
|
||||
required Pointer<git_repository> repoPointer,
|
||||
required String name,
|
||||
|
|
|
@ -73,7 +73,7 @@ Pointer<git_tree_entry> getByName({
|
|||
/// Retrieve a tree entry contained in a tree or in any of its subtrees, given its relative path.
|
||||
///
|
||||
/// Unlike the other lookup functions, the returned tree entry is owned by the user and must be
|
||||
/// freed explicitly with `entryFree()`.
|
||||
/// freed explicitly with [entryFree].
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
Pointer<git_tree_entry> getByPath({
|
||||
|
@ -122,7 +122,7 @@ int compare({
|
|||
/// Free a user-owned tree entry.
|
||||
///
|
||||
/// IMPORTANT: This function is only needed for tree entries owned by the user,
|
||||
/// such as `getByPath()`.
|
||||
/// such as [getByPath].
|
||||
void entryFree(Pointer<git_tree_entry> entry) =>
|
||||
libgit2.git_tree_entry_free(entry);
|
||||
|
||||
|
|
|
@ -6,10 +6,6 @@ import 'bindings/libgit2_bindings.dart';
|
|||
import 'bindings/blame.dart' as bindings;
|
||||
|
||||
class Blame with IterableMixin<BlameHunk> {
|
||||
/// Initializes a new instance of the [Blame] class from
|
||||
/// provided pointer to blame object in memory.
|
||||
Blame(this._blamePointer);
|
||||
|
||||
/// Initializes a new instance of the [Blame] class by getting
|
||||
/// the blame for a single file.
|
||||
///
|
||||
|
|
|
@ -78,6 +78,9 @@ class KeypairFromAgent implements Credentials {
|
|||
|
||||
@override
|
||||
GitCredential get credentialType => GitCredential.sshKey;
|
||||
|
||||
@override
|
||||
String toString() => 'KeypairFromAgent{username: $username}';
|
||||
}
|
||||
|
||||
/// Ssh key credential used for reading the keys from memory.
|
||||
|
@ -106,7 +109,7 @@ class KeypairFromMemory implements Credentials {
|
|||
|
||||
@override
|
||||
String toString() {
|
||||
return 'KeypairFromAgent{username: $username, pubKey: $pubKey, privateKey: $privateKey, '
|
||||
return 'KeypairFromMemory{username: $username, pubKey: $pubKey, privateKey: $privateKey, '
|
||||
'passPhrase: $passPhrase}';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,12 +2,14 @@ import 'dart:ffi';
|
|||
import 'package:ffi/ffi.dart';
|
||||
import 'bindings/libgit2_bindings.dart';
|
||||
|
||||
/// Details of the last error that occurred.
|
||||
class LibGit2Error {
|
||||
LibGit2Error(this.errorPointer);
|
||||
final Pointer<git_error> errorPointer;
|
||||
LibGit2Error(this._errorPointer);
|
||||
|
||||
final Pointer<git_error> _errorPointer;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return errorPointer.ref.message.cast<Utf8>().toDartString();
|
||||
return _errorPointer.ref.message.cast<Utf8>().toDartString();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,9 +67,7 @@ class Index with IterableMixin<IndexEntry> {
|
|||
? their = null
|
||||
: their = IndexEntry(entry['their']!);
|
||||
|
||||
if (ancestor != null) {
|
||||
path = ancestor.path;
|
||||
} else if (our != null) {
|
||||
if (our != null) {
|
||||
path = our.path;
|
||||
} else {
|
||||
path = their!.path;
|
||||
|
|
|
@ -5,10 +5,6 @@ import 'bindings/mailmap.dart' as bindings;
|
|||
import 'util.dart';
|
||||
|
||||
class Mailmap {
|
||||
/// Initializes a new instance of [Mailmap] class from provided
|
||||
/// pointer to mailmap object in memory.
|
||||
Mailmap(this._mailmapPointer);
|
||||
|
||||
/// Initializes a new instance of [Mailmap] class.
|
||||
///
|
||||
/// This object is empty, so you'll have to add a mailmap file before you can
|
||||
|
@ -49,10 +45,8 @@ class Mailmap {
|
|||
_mailmapPointer = bindings.fromRepository(repo.pointer);
|
||||
}
|
||||
|
||||
late final Pointer<git_mailmap> _mailmapPointer;
|
||||
|
||||
/// Pointer to memory address for allocated mailmap object.
|
||||
Pointer<git_mailmap> get pointer => _mailmapPointer;
|
||||
late final Pointer<git_mailmap> _mailmapPointer;
|
||||
|
||||
/// Returns list containing resolved [name] and [email] to the corresponding real name
|
||||
/// and real email respectively.
|
||||
|
|
|
@ -79,8 +79,8 @@ class Oid {
|
|||
1);
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => _oidPointer.address.hashCode;
|
||||
@override // coverage:ignore-line
|
||||
int get hashCode => _oidPointer.address.hashCode; // coverage:ignore-line
|
||||
|
||||
@override
|
||||
String toString() => 'Oid{sha: $sha}';
|
||||
|
|
|
@ -13,10 +13,8 @@ class PackBuilder {
|
|||
_packbuilderPointer = bindings.init(repo.pointer);
|
||||
}
|
||||
|
||||
late final Pointer<git_packbuilder> _packbuilderPointer;
|
||||
|
||||
/// Pointer to memory address for allocated packbuilder object.
|
||||
Pointer<git_packbuilder> get pointer => _packbuilderPointer;
|
||||
late final Pointer<git_packbuilder> _packbuilderPointer;
|
||||
|
||||
/// Adds a single object.
|
||||
///
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'dart:ffi';
|
||||
import 'package:ffi/ffi.dart';
|
||||
import 'package:libgit2dart/libgit2dart.dart';
|
||||
import 'bindings/libgit2_bindings.dart';
|
||||
import 'bindings/rebase.dart' as bindings;
|
||||
|
@ -80,7 +79,7 @@ class Rebase {
|
|||
}
|
||||
|
||||
/// Commits the current patch. You must have resolved any conflicts that were
|
||||
/// introduced during the patch application from the `next()` invocation.
|
||||
/// introduced during the patch application from the [next] invocation.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
void commit({
|
||||
|
@ -126,18 +125,9 @@ class RebaseOperation {
|
|||
);
|
||||
}
|
||||
|
||||
/// Returns the commit [Oid] being cherry-picked. This will be populated for
|
||||
/// all operations except those of type [GitRebaseOperation.exec].
|
||||
/// Returns the commit [Oid] being cherry-picked.
|
||||
Oid get oid => Oid.fromRaw(_rebaseOperationPointer.ref.id);
|
||||
|
||||
/// The executable the user has requested be run. This will only
|
||||
/// be populated for operations of type [GitRebaseOperation.exec].
|
||||
String get exec {
|
||||
return _rebaseOperationPointer.ref.exec == nullptr
|
||||
? ''
|
||||
: _rebaseOperationPointer.ref.exec.cast<Utf8>().toDartString();
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'RebaseOperation{type: $type, oid: $oid}';
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import 'bindings/reference.dart' as bindings;
|
|||
import 'bindings/object.dart' as object_bindings;
|
||||
import 'bindings/refdb.dart' as refdb_bindings;
|
||||
import 'bindings/repository.dart' as repository_bindings;
|
||||
import 'util.dart';
|
||||
|
||||
class Reference {
|
||||
/// Initializes a new instance of the [Reference] class.
|
||||
|
@ -30,6 +29,9 @@ class Reference {
|
|||
///
|
||||
/// The [logMessage] message for the reflog will be ignored if the reference does not belong in the
|
||||
/// standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured or [ArgumentError] if provided [target]
|
||||
/// is not Oid or String reference name.
|
||||
Reference.create({
|
||||
required Repository repo,
|
||||
required String name,
|
||||
|
@ -37,35 +39,25 @@ class Reference {
|
|||
bool force = false,
|
||||
String? logMessage,
|
||||
}) {
|
||||
late final Oid oid;
|
||||
late final bool isDirect;
|
||||
|
||||
if (target is Oid) {
|
||||
oid = target;
|
||||
isDirect = true;
|
||||
} else if (isValidShaHex(target as String)) {
|
||||
oid = Oid.fromSHA(repo: repo, sha: target);
|
||||
isDirect = true;
|
||||
} else {
|
||||
isDirect = false;
|
||||
}
|
||||
|
||||
if (isDirect) {
|
||||
_refPointer = bindings.createDirect(
|
||||
repoPointer: repo.pointer,
|
||||
name: name,
|
||||
oidPointer: oid.pointer,
|
||||
oidPointer: target.pointer,
|
||||
force: force,
|
||||
logMessage: logMessage,
|
||||
);
|
||||
} else if (target is String) {
|
||||
_refPointer = bindings.createSymbolic(
|
||||
repoPointer: repo.pointer,
|
||||
name: name,
|
||||
target: target,
|
||||
force: force,
|
||||
logMessage: logMessage,
|
||||
);
|
||||
} else {
|
||||
_refPointer = bindings.createSymbolic(
|
||||
repoPointer: repo.pointer,
|
||||
name: name,
|
||||
target: target as String,
|
||||
force: force,
|
||||
logMessage: logMessage,
|
||||
);
|
||||
throw ArgumentError.value(
|
||||
'$target must be either Oid or String reference name');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,8 +267,8 @@ class Reference {
|
|||
/// Releases memory allocated for reference object.
|
||||
void free() => bindings.free(_refPointer);
|
||||
|
||||
@override
|
||||
int get hashCode => _refPointer.address.hashCode;
|
||||
@override // coverage:ignore-line
|
||||
int get hashCode => _refPointer.address.hashCode; // coverage:ignore-line
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
|
|
@ -50,7 +50,7 @@ class RefLogEntry {
|
|||
Signature get committer => Signature(bindings.entryCommiter(_entryPointer));
|
||||
|
||||
@override
|
||||
String toString() => 'ReflogEntry{message: $message, committer: $committer}';
|
||||
String toString() => 'RefLogEntry{message: $message, committer: $committer}';
|
||||
}
|
||||
|
||||
class _RefLogIterator implements Iterator<RefLogEntry> {
|
||||
|
|
|
@ -4,10 +4,6 @@ import 'bindings/libgit2_bindings.dart';
|
|||
import 'bindings/remote.dart' as bindings;
|
||||
|
||||
class Remote {
|
||||
/// Initializes a new instance of [Remote] class from provided pointer
|
||||
/// to remote object in memory.
|
||||
Remote(this._remotePointer);
|
||||
|
||||
/// Initializes a new instance of [Remote] class by looking up remote with
|
||||
/// provided [name] in a [repo]sitory.
|
||||
///
|
||||
|
|
|
@ -375,6 +375,9 @@ class Repository {
|
|||
///
|
||||
/// The [logMessage] message for the reflog will be ignored if the reference does not belong in the
|
||||
/// standard set (HEAD, branches and remote-tracking branches) and it does not have a reflog.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured or [ArgumentError] if provided [target]
|
||||
/// is not Oid or String reference name.
|
||||
Reference createReference({
|
||||
required String name,
|
||||
required Object target,
|
||||
|
@ -838,14 +841,14 @@ class Repository {
|
|||
/// Throws a [LibGit2Error] if error occured.
|
||||
String mergeFileFromIndex({
|
||||
required IndexEntry? ancestor,
|
||||
required IndexEntry? ours,
|
||||
required IndexEntry? theirs,
|
||||
required IndexEntry ours,
|
||||
required IndexEntry theirs,
|
||||
}) {
|
||||
return merge_bindings.mergeFileFromIndex(
|
||||
repoPointer: _repoPointer,
|
||||
ancestorPointer: ancestor?.pointer,
|
||||
oursPointer: ours?.pointer,
|
||||
theirsPointer: theirs?.pointer,
|
||||
oursPointer: ours.pointer,
|
||||
theirsPointer: theirs.pointer,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1435,7 +1438,7 @@ class Repository {
|
|||
bool? alwaysUseLongFormat,
|
||||
String? dirtySuffix,
|
||||
}) {
|
||||
late final Pointer<git_describe_result> describeResult;
|
||||
Pointer<git_describe_result> describeResult = nullptr;
|
||||
|
||||
if (commit != null) {
|
||||
describeResult = describe_bindings.commit(
|
||||
|
|
|
@ -78,8 +78,9 @@ class Signature {
|
|||
/// Releases memory allocated for signature object.
|
||||
void free() => bindings.free(_signaturePointer);
|
||||
|
||||
@override
|
||||
int get hashCode => _signaturePointer.address.hashCode;
|
||||
@override // coverage:ignore-line
|
||||
int get hashCode =>
|
||||
_signaturePointer.address.hashCode; // coverage:ignore-line
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
|
|
|
@ -4,10 +4,6 @@ import 'bindings/libgit2_bindings.dart';
|
|||
import 'bindings/submodule.dart' as bindings;
|
||||
|
||||
class Submodule {
|
||||
/// Initializes a new instance of [Submodule] class from provided
|
||||
/// pointer to submodule object in memory.
|
||||
Submodule(this._submodulePointer);
|
||||
|
||||
/// Initializes a new instance of [Submodule] class by looking up
|
||||
/// submodule information by name or path.
|
||||
///
|
||||
|
@ -53,10 +49,8 @@ class Submodule {
|
|||
bindings.addFinalize(_submodulePointer);
|
||||
}
|
||||
|
||||
late final Pointer<git_submodule> _submodulePointer;
|
||||
|
||||
/// Pointer to memory address for allocated submodule object.
|
||||
Pointer<git_submodule> get pointer => _submodulePointer;
|
||||
late final Pointer<git_submodule> _submodulePointer;
|
||||
|
||||
/// Copies submodule info into ".git/config" file.
|
||||
///
|
||||
|
|
|
@ -21,10 +21,8 @@ class Tag {
|
|||
);
|
||||
}
|
||||
|
||||
late final Pointer<git_tag> _tagPointer;
|
||||
|
||||
/// Pointer to memory address for allocated tag object.
|
||||
Pointer<git_tag> get pointer => _tagPointer;
|
||||
late final Pointer<git_tag> _tagPointer;
|
||||
|
||||
/// Creates a new tag in the repository for provided [target] object.
|
||||
///
|
||||
|
|
|
@ -40,7 +40,7 @@ class Tree {
|
|||
return result;
|
||||
}
|
||||
|
||||
/// Looksup a tree entry in the tree.
|
||||
/// Lookups a tree entry in the tree.
|
||||
///
|
||||
/// If integer [value] is provided, lookup is done by entry position in the tree.
|
||||
///
|
||||
|
@ -158,53 +158,9 @@ class TreeEntry {
|
|||
return GitFilemode.values.singleWhere((mode) => modeInt == mode.value);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
return (other is TreeEntry) &&
|
||||
(bindings.compare(
|
||||
aPointer: _treeEntryPointer,
|
||||
bPointer: other._treeEntryPointer) ==
|
||||
0);
|
||||
}
|
||||
|
||||
bool operator <(other) {
|
||||
return (other is TreeEntry) &&
|
||||
(bindings.compare(
|
||||
aPointer: _treeEntryPointer,
|
||||
bPointer: other._treeEntryPointer) ==
|
||||
-1);
|
||||
}
|
||||
|
||||
bool operator <=(other) {
|
||||
return (other is TreeEntry) &&
|
||||
(bindings.compare(
|
||||
aPointer: _treeEntryPointer,
|
||||
bPointer: other._treeEntryPointer) ==
|
||||
-1);
|
||||
}
|
||||
|
||||
bool operator >(other) {
|
||||
return (other is TreeEntry) &&
|
||||
(bindings.compare(
|
||||
aPointer: _treeEntryPointer,
|
||||
bPointer: other._treeEntryPointer) ==
|
||||
1);
|
||||
}
|
||||
|
||||
bool operator >=(other) {
|
||||
return (other is TreeEntry) &&
|
||||
(bindings.compare(
|
||||
aPointer: _treeEntryPointer,
|
||||
bPointer: other._treeEntryPointer) ==
|
||||
1);
|
||||
}
|
||||
|
||||
/// Releases memory allocated for tree entry object.
|
||||
void free() => bindings.entryFree(_treeEntryPointer);
|
||||
|
||||
@override
|
||||
int get hashCode => _treeEntryPointer.address.hashCode;
|
||||
|
||||
@override
|
||||
String toString() => 'TreeEntry{oid: $oid, name: $name, filemode: $filemode}';
|
||||
}
|
||||
|
|
|
@ -17,10 +17,8 @@ class TreeBuilder {
|
|||
);
|
||||
}
|
||||
|
||||
late final Pointer<git_treebuilder> _treeBuilderPointer;
|
||||
|
||||
/// Pointer to memory address for allocated tree builder object.
|
||||
Pointer<git_treebuilder> get pointer => _treeBuilderPointer;
|
||||
late final Pointer<git_treebuilder> _treeBuilderPointer;
|
||||
|
||||
/// Returns the number of entries listed in a tree builder.
|
||||
int get length => bindings.entryCount(_treeBuilderPointer);
|
||||
|
|
|
@ -7,14 +7,14 @@ DynamicLibrary loadLibrary() {
|
|||
return DynamicLibrary.open(
|
||||
'${Directory.current.path}/libgit2/libgit2.so.1.3.0');
|
||||
}
|
||||
if (Platform.isMacOS) {
|
||||
return DynamicLibrary.open(
|
||||
'${Directory.current.path}/libgit2/libgit2-1.2.0.dylib');
|
||||
}
|
||||
if (Platform.isWindows) {
|
||||
return DynamicLibrary.open(
|
||||
'${Directory.current.path}/libgit2/libgit2-1.2.0.dll');
|
||||
}
|
||||
// if (Platform.isMacOS) {
|
||||
// return DynamicLibrary.open(
|
||||
// '${Directory.current.path}/libgit2/libgit2-1.2.0.dylib');
|
||||
// }
|
||||
// if (Platform.isWindows) {
|
||||
// return DynamicLibrary.open(
|
||||
// '${Directory.current.path}/libgit2/libgit2-1.2.0.dll');
|
||||
// }
|
||||
throw Exception('Platform not implemented');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue