refactor!: use named arguments if there is more than one

This commit is contained in:
Aleksey Kulikov 2021-09-30 18:04:36 +03:00
parent ec80ad3dd4
commit 5f7fdf4bd3
66 changed files with 1920 additions and 1136 deletions

View file

@ -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());