headless wip

This commit is contained in:
Peter Cottle 2013-07-07 22:10:12 -07:00
parent b7fb355b97
commit e6942446df
2 changed files with 8 additions and 4 deletions

View file

@ -67,12 +67,16 @@ HeadlessGit.prototype.init = function() {
this.gitEngine.init();
};
HeadlessGit.prototype.sendCommand = function(value) {
HeadlessGit.prototype.sendCommand = function(value, cb) {
var deferred = Q.defer();
var chain = deferred.promise;
util.splitTextCommand(value, function(commandStr) {
var commandObj = new Command({
rawStr: commandStr
});
this.gitEngine.dispatch(commandObj, Q.defer());
var thisDeferred = Q.defer();
this.gitEngine.dispatch(commandObj, thisDeferred);
chain = chain.then(thisPromise);
}, this);
};