mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-30 01:34:26 +02:00
Finally fixed async git dispatching and promise chains, fixed rebase level Issue #111
This commit is contained in:
parent
380bcfaa4b
commit
a95a56241b
6 changed files with 25 additions and 24 deletions
|
@ -83,12 +83,15 @@ HeadlessGit.prototype.sendCommand = function(value, entireCommandPromise) {
|
|||
var startTime = new Date().getTime();
|
||||
|
||||
util.splitTextCommand(value, function(commandStr) {
|
||||
var commandObj = new Command({
|
||||
rawStr: commandStr
|
||||
});
|
||||
var thisDeferred = Q.defer();
|
||||
this.gitEngine.dispatch(commandObj, thisDeferred);
|
||||
chain = chain.then(thisDeferred.promise);
|
||||
chain = chain.then(_.bind(function() {
|
||||
var commandObj = new Command({
|
||||
rawStr: commandStr
|
||||
});
|
||||
|
||||
var thisDeferred = Q.defer();
|
||||
this.gitEngine.dispatch(commandObj, thisDeferred);
|
||||
return thisDeferred.promise;
|
||||
}, this));
|
||||
}, this);
|
||||
|
||||
chain.then(function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue