mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
feat(reference): add ability to get log of reference
This commit is contained in:
parent
a97dcaa0d3
commit
58fa54f24a
5 changed files with 30 additions and 7 deletions
|
@ -43,12 +43,13 @@ String entryMessage(Pointer<git_reflog_entry> entry) {
|
|||
return result.cast<Utf8>().toDartString();
|
||||
}
|
||||
|
||||
/// Get the committer of this entry.
|
||||
Map<String, String> entryCommiter(Pointer<git_reflog_entry> entry) {
|
||||
/// 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, String>{};
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue