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 chain = pendingFetch.chain;
var deferred = pendingFetch.deferred; 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 // delay a bit after the intense refresh animation from
// fetch // fetch
@ -8348,6 +8356,7 @@ GitEngine.prototype.pullFinishWithRebase = function(
pendingFetch.dontResolvePromise = true; pendingFetch.dontResolvePromise = true;
return this.rebase(remoteBranch, localBranch, pendingFetch); return this.rebase(remoteBranch, localBranch, pendingFetch);
}, this)); }, this));
chain = chain.fail(catchShortCircuit);
this.animationQueue.thenFinish(chain, deferred); this.animationQueue.thenFinish(chain, deferred);
}; };
@ -27175,6 +27184,14 @@ GitEngine.prototype.pullFinishWithRebase = function(
) { ) {
var chain = pendingFetch.chain; var chain = pendingFetch.chain;
var deferred = pendingFetch.deferred; 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 // delay a bit after the intense refresh animation from
// fetch // fetch
@ -27195,6 +27212,7 @@ GitEngine.prototype.pullFinishWithRebase = function(
pendingFetch.dontResolvePromise = true; pendingFetch.dontResolvePromise = true;
return this.rebase(remoteBranch, localBranch, pendingFetch); return this.rebase(remoteBranch, localBranch, pendingFetch);
}, this)); }, this));
chain = chain.fail(catchShortCircuit);
this.animationQueue.thenFinish(chain, deferred); this.animationQueue.thenFinish(chain, deferred);
}; };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
build/bundle.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -445,7 +445,7 @@
For a much easier time perusing the source, see the individual files at: For a much easier time perusing the source, see the individual files at:
https://github.com/pcottle/learnGitBranching https://github.com/pcottle/learnGitBranching
--> -->
<script src="build/bundle.min.66308339.js"></script> <script src="build/bundle.min.9efac7f0.js"></script>
<!-- The advantage of github pages: super-easy, simple, slick static hostic. <!-- The advantage of github pages: super-easy, simple, slick static hostic.
The downside? No raw logs to parse for analytics, so I have to include The downside? No raw logs to parse for analytics, so I have to include

View file

@ -1102,6 +1102,14 @@ GitEngine.prototype.pullFinishWithRebase = function(
) { ) {
var chain = pendingFetch.chain; var chain = pendingFetch.chain;
var deferred = pendingFetch.deferred; 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 // delay a bit after the intense refresh animation from
// fetch // fetch
@ -1122,6 +1130,7 @@ GitEngine.prototype.pullFinishWithRebase = function(
pendingFetch.dontResolvePromise = true; pendingFetch.dontResolvePromise = true;
return this.rebase(remoteBranch, localBranch, pendingFetch); return this.rebase(remoteBranch, localBranch, pendingFetch);
}, this)); }, this));
chain = chain.fail(catchShortCircuit);
this.animationQueue.thenFinish(chain, deferred); this.animationQueue.thenFinish(chain, deferred);
}; };