mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor!: use named arguments if there is more than one
This commit is contained in:
parent
ec80ad3dd4
commit
5f7fdf4bd3
66 changed files with 1920 additions and 1136 deletions
|
@ -15,13 +15,18 @@ import '../util.dart';
|
|||
/// with the content of the index. (Untracked and ignored files will be left alone, however.)
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
void reset(
|
||||
Pointer<git_repository> repo,
|
||||
Pointer<git_object> target,
|
||||
int resetType,
|
||||
Pointer<git_checkout_options> checkoutOpts,
|
||||
) {
|
||||
final error = libgit2.git_reset(repo, target, resetType, checkoutOpts);
|
||||
void reset({
|
||||
required Pointer<git_repository> repoPointer,
|
||||
required Pointer<git_object> targetPointer,
|
||||
required int resetType,
|
||||
required Pointer<git_checkout_options> checkoutOptsPointer,
|
||||
}) {
|
||||
final error = libgit2.git_reset(
|
||||
repoPointer,
|
||||
targetPointer,
|
||||
resetType,
|
||||
checkoutOptsPointer,
|
||||
);
|
||||
|
||||
if (error < 0) {
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue