mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 12:49:08 -04:00
refactor!: use Oid instead of String for arguments
This commit is contained in:
parent
23787adc3a
commit
1972c6d1ab
39 changed files with 264 additions and 290 deletions
|
@ -23,22 +23,22 @@ List<Map<String, Pointer>> list(Pointer<git_repository> repo) {
|
|||
var nextError = 0;
|
||||
|
||||
while (nextError >= 0) {
|
||||
final noteId = calloc<git_oid>();
|
||||
var annotatedId = calloc<git_oid>();
|
||||
nextError = libgit2.git_note_next(noteId, annotatedId, iterator.value);
|
||||
final noteOid = calloc<git_oid>();
|
||||
var annotatedOid = calloc<git_oid>();
|
||||
nextError = libgit2.git_note_next(noteOid, annotatedOid, iterator.value);
|
||||
if (nextError >= 0) {
|
||||
final out = calloc<Pointer<git_note>>();
|
||||
final error = libgit2.git_note_read(out, repo, notesRef, annotatedId);
|
||||
final error = libgit2.git_note_read(out, repo, notesRef, annotatedOid);
|
||||
|
||||
calloc.free(noteId);
|
||||
calloc.free(noteOid);
|
||||
|
||||
if (error < 0) {
|
||||
calloc.free(out);
|
||||
calloc.free(annotatedId);
|
||||
calloc.free(annotatedOid);
|
||||
calloc.free(iterator);
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
} else {
|
||||
result.add({'note': out.value, 'annotatedId': annotatedId});
|
||||
result.add({'note': out.value, 'annotatedOid': annotatedOid});
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue