mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor: use extensions (#62)
This commit is contained in:
parent
4aea9a306a
commit
3d235f5ce4
47 changed files with 386 additions and 355 deletions
|
@ -3,6 +3,7 @@ import 'dart:ffi';
|
|||
import 'package:ffi/ffi.dart';
|
||||
import 'package:libgit2dart/src/bindings/libgit2_bindings.dart';
|
||||
import 'package:libgit2dart/src/error.dart';
|
||||
import 'package:libgit2dart/src/extensions.dart';
|
||||
import 'package:libgit2dart/src/util.dart';
|
||||
|
||||
/// Sets the current head to the specified commit oid and optionally resets the
|
||||
|
@ -40,8 +41,7 @@ void resetDefault({
|
|||
required List<String> pathspec,
|
||||
}) {
|
||||
final pathspecC = calloc<git_strarray>();
|
||||
final pathPointers =
|
||||
pathspec.map((e) => e.toNativeUtf8().cast<Char>()).toList();
|
||||
final pathPointers = pathspec.map((e) => e.toChar()).toList();
|
||||
final strArray = calloc<Pointer<Char>>(pathspec.length);
|
||||
|
||||
for (var i = 0; i < pathspec.length; i++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue