mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
headless wip
This commit is contained in:
parent
b7fb355b97
commit
e6942446df
2 changed files with 8 additions and 4 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue