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

@ -1102,6 +1102,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
@ -1122,6 +1130,7 @@ GitEngine.prototype.pullFinishWithRebase = function(
pendingFetch.dontResolvePromise = true;
return this.rebase(remoteBranch, localBranch, pendingFetch);
}, this));
chain = chain.fail(catchShortCircuit);
this.animationQueue.thenFinish(chain, deferred);
};