mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor(reflog): use Signature class instead of Map
This commit is contained in:
parent
dc5f510aa5
commit
0509895b72
4 changed files with 15 additions and 19 deletions
|
@ -43,14 +43,9 @@ String entryMessage(Pointer<git_reflog_entry> entry) {
|
|||
return result.cast<Utf8>().toDartString();
|
||||
}
|
||||
|
||||
/// Get the committer of this entry (name, email, seconds from epoch).
|
||||
Map<String, Object> entryCommiter(Pointer<git_reflog_entry> entry) {
|
||||
final result = libgit2.git_reflog_entry_committer(entry);
|
||||
var committer = <String, Object>{};
|
||||
committer['name'] = result.ref.name.cast<Utf8>().toDartString();
|
||||
committer['email'] = result.ref.email.cast<Utf8>().toDartString();
|
||||
committer['when'] = result.ref.when.time;
|
||||
return committer;
|
||||
/// Get the committer of this entry.
|
||||
Pointer<git_signature> entryCommiter(Pointer<git_reflog_entry> entry) {
|
||||
return libgit2.git_reflog_entry_committer(entry);
|
||||
}
|
||||
|
||||
/// Free the reflog.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue