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

Fixed test and made repo blob method return a promise

parent a48779bc
......@@ -511,8 +511,8 @@ Repository.prototype.createBranch = function(name, commit, force) {
* @param {Buffer} buffer
* @return {Oid}
*/
Repository.prototype.createBlobFromBuffer = function(buffer, callback) {
return Blob.createFromBuffer(this, buffer, buffer.length, callback);
Repository.prototype.createBlobFromBuffer = function(buffer) {
return Blob.createFromBuffer(this, buffer, buffer.length);
};
/**
......@@ -1784,9 +1784,9 @@ Repository.prototype.stageLines =
.then(function(newContent) {
var newContentBuffer = new Buffer(newContent);
var newOid = repo.createBlobFromBuffer(newContentBuffer);
return repo.getBlob(newOid);
return repo.createBlobFromBuffer(newContentBuffer);
})
.then(newOid => repo.getBlob(newOid))
.then(function(newBlob) {
var entry = index.getByPath(filePath, 0);
entry.id = newBlob.id();
......
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