Commit a48779bc authored by Carson Howard's avatar Carson Howard Committed by Carson Howard

Added blob methods and converted to async

parent 427f9872
......@@ -130,7 +130,7 @@
"selfFreeing": true,
"functions": {
"git_blob_create_frombuffer": {
"isAsync": false,
"isAsync": true,
"args": {
"id": {
"isReturn": true
......@@ -141,11 +141,59 @@
}
}
},
"git_blob_create_fromworkdir": {
"isAsync": true,
"args": {
"id": {
"isReturn": true
}
},
"return": {
"isErrorCode": true
}
},
"git_blob_create_fromdisk": {
"isAsync": true,
"args": {
"id": {
"isReturn": true
}
},
"return": {
"isErrorCode": true
}
},
"git_blob_create_fromchunks": {
"ignore": true
},
"git_blob_filtered_content": {
"ignore": true
"isAsync": true,
"isPrototypeMethod": false,
"args": {
"out": {
"isReturn": true,
"cppClassName": "GitBuf",
"jsClassName": "Buffer"
},
"blob": {
"cppClassName": "GitBlob",
"jsClassName": "Blob",
"isSelf": false
},
"as_path": {
"cppClassName": "String",
"jsClassName": "String",
"cType": "const char *"
},
"check_for_binary_data": {
"cppClassName": "Number",
"jsClassName": "Number",
"cType": "int"
}
},
"return": {
"isErrorCode": true
}
},
"git_blob_id": {
"return": {
......
This diff is collapsed.
......@@ -247,10 +247,13 @@ describe("Diff", function() {
function(done) {
var evilString = "Unicode’s fun!\nAnd it’s good for you!\n";
var buffer = new Buffer(evilString);
var oid = Blob.createFromBuffer(this.repository, buffer, buffer.length);
Blob.lookup(this.repository, oid)
var test = this;
Blob.createFromBuffer(test.repository, buffer, buffer.length)
.then(function(oid) {
return Blob.lookup(test.repository, oid);
})
.then(function(blob) {
blob.repo = this.repository;
blob.repo = test.repository;
return Diff.blobToBuffer(
blob,
null,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment