We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fab9237 commit 2cef5b5Copy full SHA for 2cef5b5
lib/note.js
@@ -5,5 +5,12 @@ var Note = NodeGit.Note;
5
// Override Note.foreach to eliminate the need to pass null payload
6
var foreach = Note.foreach;
7
Note.foreach = function(repo, notesRef, callback) {
8
- return foreach(repo, notesRef, callback, null);
+ function wrapperCallback(blobId, objectId) {
9
+ // We need to copy the OID since libgit2 types are getting cleaned up
10
+ // incorrectly right now in callbacks
11
+
12
+ return callback(blobId.copy(), objectId.copy());
13
+ }
14
15
+ return foreach(repo, notesRef, wrapperCallback, null);
16
};
0 commit comments