mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor!: change api entry points
This commit is contained in:
parent
06b44597d5
commit
5feb12fdaa
9 changed files with 411 additions and 457 deletions
|
@ -19,6 +19,17 @@ class RefLog {
|
|||
/// Pointer to memory address for allocated reflog object.
|
||||
late final Pointer<git_reflog> _reflogPointer;
|
||||
|
||||
/// Returns a list with entries of reference log.
|
||||
List<RefLogEntry> list() {
|
||||
var log = <RefLogEntry>[];
|
||||
|
||||
for (var i = 0; i < count; i++) {
|
||||
log.add(entryAt(i));
|
||||
}
|
||||
|
||||
return log;
|
||||
}
|
||||
|
||||
/// Returns the number of log entries in a reflog.
|
||||
int get count => bindings.entryCount(_reflogPointer);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue