mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +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() {
|
||||
|
|
|
@ -1144,7 +1144,7 @@ GitEngine.prototype.fakeTeamworkStarter = function() {
|
|||
this.validateArgBounds(this.generalArgs, 0, 2);
|
||||
// allow formats of: git Faketeamwork 2 or git Faketeamwork side 3
|
||||
var branch = (this.origin.refs[this.generalArgs[0]]) ?
|
||||
this.generalArgs[0] || 'master';
|
||||
this.generalArgs[0] : 'master';
|
||||
var numToMake = parseInt(this.generalArgs[0], 10) || this.generalArgs[1] || 1;
|
||||
|
||||
// make sure its a branch and exists
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue