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
|
@ -21,7 +21,12 @@ class Worktree {
|
|||
required String path,
|
||||
Reference? ref,
|
||||
}) {
|
||||
_worktreePointer = bindings.create(repo.pointer, name, path, ref?.pointer);
|
||||
_worktreePointer = bindings.create(
|
||||
repoPointer: repo.pointer,
|
||||
name: name,
|
||||
path: path,
|
||||
refPointer: ref?.pointer,
|
||||
);
|
||||
}
|
||||
|
||||
/// Initializes a new instance of [Worktree] class by looking up existing worktree
|
||||
|
@ -30,8 +35,8 @@ class Worktree {
|
|||
/// Should be freed with `free()` to release allocated memory.
|
||||
///
|
||||
/// Throws a [LibGit2Error] if error occured.
|
||||
Worktree.lookup(Repository repo, String name) {
|
||||
_worktreePointer = bindings.lookup(repo.pointer, name);
|
||||
Worktree.lookup({required Repository repo, required String name}) {
|
||||
_worktreePointer = bindings.lookup(repoPointer: repo.pointer, name: name);
|
||||
}
|
||||
|
||||
/// Pointer to memory address for allocated branch object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue