refactor!: change api entry points

This commit is contained in:
Aleksey Kulikov 2021-08-11 17:02:32 +03:00
parent 06b44597d5
commit 5feb12fdaa
9 changed files with 411 additions and 457 deletions

View file

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