mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor: pass repository object to arguments instead of pointer
This commit is contained in:
parent
94b4116adf
commit
e0e3742457
6 changed files with 45 additions and 26 deletions
|
@ -238,7 +238,7 @@ class Repository {
|
|||
Reference get head => Reference(_repoPointer, bindings.head(_repoPointer));
|
||||
|
||||
/// Returns [References] object.
|
||||
References get references => References(_repoPointer);
|
||||
References get references => References(this);
|
||||
|
||||
/// Creates a new reference.
|
||||
///
|
||||
|
@ -278,7 +278,7 @@ class Repository {
|
|||
|
||||
if (isDirect) {
|
||||
return Reference.createDirect(
|
||||
repo: _repoPointer,
|
||||
repo: this,
|
||||
name: name,
|
||||
oid: oid.pointer,
|
||||
force: force,
|
||||
|
@ -286,7 +286,7 @@ class Repository {
|
|||
);
|
||||
} else {
|
||||
return Reference.createSymbolic(
|
||||
repo: _repoPointer,
|
||||
repo: this,
|
||||
name: name,
|
||||
target: target as String,
|
||||
force: force,
|
||||
|
@ -318,6 +318,6 @@ class Repository {
|
|||
} else {
|
||||
throw ArgumentError.value('$sha is not a valid sha hex string');
|
||||
}
|
||||
return Commit.lookup(_repoPointer, oid.pointer);
|
||||
return Commit.lookup(this, oid);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue