Issue #130 -- slightly odd rebase animation fixed

This commit is contained in:
Peter Cottle 2013-10-06 22:48:04 -07:00
parent 73660f7126
commit 79d65e739a
6 changed files with 30 additions and 3 deletions

View file

@ -8328,6 +8328,14 @@ GitEngine.prototype.pullFinishWithRebase = function(
) {
var chain = pendingFetch.chain;
var deferred = pendingFetch.deferred;
chain = chain.then(_.bind(function() {
if (this.isUpstreamOf(remoteBranch, localBranch)) {
this.command.set('error', new CommandResult({
msg: intl.str('git-result-uptodate')
}));
throw SHORT_CIRCUIT_CHAIN;
}
}, this));
// delay a bit after the intense refresh animation from
// fetch
@ -8348,6 +8356,7 @@ GitEngine.prototype.pullFinishWithRebase = function(
pendingFetch.dontResolvePromise = true;
return this.rebase(remoteBranch, localBranch, pendingFetch);
}, this));
chain = chain.fail(catchShortCircuit);
this.animationQueue.thenFinish(chain, deferred);
};
@ -27175,6 +27184,14 @@ GitEngine.prototype.pullFinishWithRebase = function(
) {
var chain = pendingFetch.chain;
var deferred = pendingFetch.deferred;
chain = chain.then(_.bind(function() {
if (this.isUpstreamOf(remoteBranch, localBranch)) {
this.command.set('error', new CommandResult({
msg: intl.str('git-result-uptodate')
}));
throw SHORT_CIRCUIT_CHAIN;
}
}, this));
// delay a bit after the intense refresh animation from
// fetch
@ -27195,6 +27212,7 @@ GitEngine.prototype.pullFinishWithRebase = function(
pendingFetch.dontResolvePromise = true;
return this.rebase(remoteBranch, localBranch, pendingFetch);
}, this));
chain = chain.fail(catchShortCircuit);
this.animationQueue.thenFinish(chain, deferred);
};