mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 15:38:33 +02:00
awesome new pull animation
This commit is contained in:
parent
d80ae31adc
commit
3458cc17af
6 changed files with 159 additions and 123 deletions
184
build/bundle.js
184
build/bundle.js
|
@ -7924,8 +7924,7 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
chain: chain,
|
chain: chain,
|
||||||
deferred: deferred,
|
deferred: deferred
|
||||||
lastCommitID: commitsToMake.pop().id
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -7948,44 +7947,61 @@ GitEngine.prototype.pull = function() {
|
||||||
var pendingFetch = this.fetch({
|
var pendingFetch = this.fetch({
|
||||||
dontResolvePromise: true
|
dontResolvePromise: true
|
||||||
});
|
});
|
||||||
|
// then either rebase or merge
|
||||||
|
if (this.commandOptions['--rebase']) {
|
||||||
|
this.rebase('o/master', 'master');
|
||||||
|
} else {
|
||||||
|
this.pullFinishWithMerge(pendingFetch, localBranch, remoteBranch);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
|
pendingFetch,
|
||||||
|
localBranch,
|
||||||
|
remoteBranch
|
||||||
|
) {
|
||||||
var chain = pendingFetch.chain;
|
var chain = pendingFetch.chain;
|
||||||
var deferred = pendingFetch.deferred;
|
var deferred = pendingFetch.deferred;
|
||||||
|
|
||||||
// then either rebase or merge
|
// delay a bit after the intense refresh animation from
|
||||||
if (this.commandOptions['--rebase']) {
|
// fetch
|
||||||
this.rebaseFinisher('o/master', 'master');
|
chain = chain.then(function() {
|
||||||
} else {
|
return AnimationFactory.getDelayedPromise(300);
|
||||||
chain = chain.then(function() {
|
});
|
||||||
return AnimationFactory.getDelayedPromise(700);
|
|
||||||
});
|
chain = chain.then(_.bind(function() {
|
||||||
|
// highlight last commit on o/master to color of
|
||||||
chain = chain.then(_.bind(function() {
|
// local branch
|
||||||
// highlight last commit on o/master
|
return AnimationFactory.playHighlightPromiseAnimation(
|
||||||
var commit = this.refs[pendingFetch.lastCommitID];
|
this.getCommitFromRef(remoteBranch),
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
localBranch
|
||||||
commit,
|
);
|
||||||
localBranch
|
}, this));
|
||||||
);
|
|
||||||
}, this));
|
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
// highlight commit on master to color of remote
|
||||||
this.getCommitFromRef('master'),
|
return AnimationFactory.playHighlightPromiseAnimation(
|
||||||
remoteBranch
|
this.getCommitFromRef(localBranch),
|
||||||
);
|
remoteBranch
|
||||||
}, this));
|
);
|
||||||
|
}, this));
|
||||||
|
|
||||||
chain = chain.then(function() {
|
// delay and merge
|
||||||
return AnimationFactory.getDelayedPromise(700);
|
chain = chain.then(function() {
|
||||||
});
|
return AnimationFactory.getDelayedPromise(700);
|
||||||
chain = chain.then(_.bind(function() {
|
});
|
||||||
var newCommit = this.merge('o/master');
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
var newCommit = this.merge('o/master');
|
||||||
newCommit,
|
if (!newCommit) {
|
||||||
this.gitVisuals
|
// it is a fast forward
|
||||||
);
|
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}
|
||||||
}
|
|
||||||
|
return AnimationFactory.playCommitBirthPromiseAnimation(
|
||||||
|
newCommit,
|
||||||
|
this.gitVisuals
|
||||||
|
);
|
||||||
|
}, this));
|
||||||
|
|
||||||
this.animationQueue.thenFinish(chain, deferred);
|
this.animationQueue.thenFinish(chain, deferred);
|
||||||
};
|
};
|
||||||
|
@ -8415,11 +8431,7 @@ GitEngine.prototype.rebaseStarter = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.twoArgsImpliedHead(this.generalArgs);
|
this.twoArgsImpliedHead(this.generalArgs);
|
||||||
this.rebaseFinisher(this.generalArgs[0], this.generalArgs[1]);
|
this.rebase(this.generalArgs[0], this.generalArgs[1]);
|
||||||
};
|
|
||||||
|
|
||||||
GitEngine.prototype.rebaseFinisher = function(targetSource, currentLocation) {
|
|
||||||
this.rebase(targetSource, currentLocation);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
||||||
|
@ -23907,8 +23919,7 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
chain: chain,
|
chain: chain,
|
||||||
deferred: deferred,
|
deferred: deferred
|
||||||
lastCommitID: commitsToMake.pop().id
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -23931,44 +23942,61 @@ GitEngine.prototype.pull = function() {
|
||||||
var pendingFetch = this.fetch({
|
var pendingFetch = this.fetch({
|
||||||
dontResolvePromise: true
|
dontResolvePromise: true
|
||||||
});
|
});
|
||||||
|
// then either rebase or merge
|
||||||
|
if (this.commandOptions['--rebase']) {
|
||||||
|
this.rebase('o/master', 'master');
|
||||||
|
} else {
|
||||||
|
this.pullFinishWithMerge(pendingFetch, localBranch, remoteBranch);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
|
pendingFetch,
|
||||||
|
localBranch,
|
||||||
|
remoteBranch
|
||||||
|
) {
|
||||||
var chain = pendingFetch.chain;
|
var chain = pendingFetch.chain;
|
||||||
var deferred = pendingFetch.deferred;
|
var deferred = pendingFetch.deferred;
|
||||||
|
|
||||||
// then either rebase or merge
|
// delay a bit after the intense refresh animation from
|
||||||
if (this.commandOptions['--rebase']) {
|
// fetch
|
||||||
this.rebaseFinisher('o/master', 'master');
|
chain = chain.then(function() {
|
||||||
} else {
|
return AnimationFactory.getDelayedPromise(300);
|
||||||
chain = chain.then(function() {
|
});
|
||||||
return AnimationFactory.getDelayedPromise(700);
|
|
||||||
});
|
chain = chain.then(_.bind(function() {
|
||||||
|
// highlight last commit on o/master to color of
|
||||||
chain = chain.then(_.bind(function() {
|
// local branch
|
||||||
// highlight last commit on o/master
|
return AnimationFactory.playHighlightPromiseAnimation(
|
||||||
var commit = this.refs[pendingFetch.lastCommitID];
|
this.getCommitFromRef(remoteBranch),
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
localBranch
|
||||||
commit,
|
);
|
||||||
localBranch
|
}, this));
|
||||||
);
|
|
||||||
}, this));
|
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
// highlight commit on master to color of remote
|
||||||
this.getCommitFromRef('master'),
|
return AnimationFactory.playHighlightPromiseAnimation(
|
||||||
remoteBranch
|
this.getCommitFromRef(localBranch),
|
||||||
);
|
remoteBranch
|
||||||
}, this));
|
);
|
||||||
|
}, this));
|
||||||
|
|
||||||
chain = chain.then(function() {
|
// delay and merge
|
||||||
return AnimationFactory.getDelayedPromise(700);
|
chain = chain.then(function() {
|
||||||
});
|
return AnimationFactory.getDelayedPromise(700);
|
||||||
chain = chain.then(_.bind(function() {
|
});
|
||||||
var newCommit = this.merge('o/master');
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
var newCommit = this.merge('o/master');
|
||||||
newCommit,
|
if (!newCommit) {
|
||||||
this.gitVisuals
|
// it is a fast forward
|
||||||
);
|
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}
|
||||||
}
|
|
||||||
|
return AnimationFactory.playCommitBirthPromiseAnimation(
|
||||||
|
newCommit,
|
||||||
|
this.gitVisuals
|
||||||
|
);
|
||||||
|
}, this));
|
||||||
|
|
||||||
this.animationQueue.thenFinish(chain, deferred);
|
this.animationQueue.thenFinish(chain, deferred);
|
||||||
};
|
};
|
||||||
|
@ -24398,11 +24426,7 @@ GitEngine.prototype.rebaseStarter = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.twoArgsImpliedHead(this.generalArgs);
|
this.twoArgsImpliedHead(this.generalArgs);
|
||||||
this.rebaseFinisher(this.generalArgs[0], this.generalArgs[1]);
|
this.rebase(this.generalArgs[0], this.generalArgs[1]);
|
||||||
};
|
|
||||||
|
|
||||||
GitEngine.prototype.rebaseFinisher = function(targetSource, currentLocation) {
|
|
||||||
this.rebase(targetSource, currentLocation);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
1
build/bundle.min.701641cf.js
Normal file
1
build/bundle.min.701641cf.js
Normal file
File diff suppressed because one or more lines are too long
2
build/bundle.min.js
vendored
2
build/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -426,7 +426,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.4369b0c9.js"></script>
|
<script src="build/bundle.min.701641cf.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
|
||||||
|
|
|
@ -882,8 +882,7 @@ GitEngine.prototype.fetch = function(options) {
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
chain: chain,
|
chain: chain,
|
||||||
deferred: deferred,
|
deferred: deferred
|
||||||
lastCommitID: commitsToMake.pop().id
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -906,44 +905,61 @@ GitEngine.prototype.pull = function() {
|
||||||
var pendingFetch = this.fetch({
|
var pendingFetch = this.fetch({
|
||||||
dontResolvePromise: true
|
dontResolvePromise: true
|
||||||
});
|
});
|
||||||
|
// then either rebase or merge
|
||||||
|
if (this.commandOptions['--rebase']) {
|
||||||
|
this.rebase('o/master', 'master');
|
||||||
|
} else {
|
||||||
|
this.pullFinishWithMerge(pendingFetch, localBranch, remoteBranch);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
GitEngine.prototype.pullFinishWithMerge = function(
|
||||||
|
pendingFetch,
|
||||||
|
localBranch,
|
||||||
|
remoteBranch
|
||||||
|
) {
|
||||||
var chain = pendingFetch.chain;
|
var chain = pendingFetch.chain;
|
||||||
var deferred = pendingFetch.deferred;
|
var deferred = pendingFetch.deferred;
|
||||||
|
|
||||||
// then either rebase or merge
|
// delay a bit after the intense refresh animation from
|
||||||
if (this.commandOptions['--rebase']) {
|
// fetch
|
||||||
this.rebaseFinisher('o/master', 'master');
|
chain = chain.then(function() {
|
||||||
} else {
|
return AnimationFactory.getDelayedPromise(300);
|
||||||
chain = chain.then(function() {
|
});
|
||||||
return AnimationFactory.getDelayedPromise(700);
|
|
||||||
});
|
chain = chain.then(_.bind(function() {
|
||||||
|
// highlight last commit on o/master to color of
|
||||||
chain = chain.then(_.bind(function() {
|
// local branch
|
||||||
// highlight last commit on o/master
|
return AnimationFactory.playHighlightPromiseAnimation(
|
||||||
var commit = this.refs[pendingFetch.lastCommitID];
|
this.getCommitFromRef(remoteBranch),
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
localBranch
|
||||||
commit,
|
);
|
||||||
localBranch
|
}, this));
|
||||||
);
|
|
||||||
}, this));
|
|
||||||
|
|
||||||
chain = chain.then(_.bind(function() {
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playHighlightPromiseAnimation(
|
// highlight commit on master to color of remote
|
||||||
this.getCommitFromRef('master'),
|
return AnimationFactory.playHighlightPromiseAnimation(
|
||||||
remoteBranch
|
this.getCommitFromRef(localBranch),
|
||||||
);
|
remoteBranch
|
||||||
}, this));
|
);
|
||||||
|
}, this));
|
||||||
|
|
||||||
chain = chain.then(function() {
|
// delay and merge
|
||||||
return AnimationFactory.getDelayedPromise(700);
|
chain = chain.then(function() {
|
||||||
});
|
return AnimationFactory.getDelayedPromise(700);
|
||||||
chain = chain.then(_.bind(function() {
|
});
|
||||||
var newCommit = this.merge('o/master');
|
chain = chain.then(_.bind(function() {
|
||||||
return AnimationFactory.playCommitBirthPromiseAnimation(
|
var newCommit = this.merge('o/master');
|
||||||
newCommit,
|
if (!newCommit) {
|
||||||
this.gitVisuals
|
// it is a fast forward
|
||||||
);
|
return AnimationFactory.playRefreshAnimation(this.gitVisuals);
|
||||||
}, this));
|
}
|
||||||
}
|
|
||||||
|
return AnimationFactory.playCommitBirthPromiseAnimation(
|
||||||
|
newCommit,
|
||||||
|
this.gitVisuals
|
||||||
|
);
|
||||||
|
}, this));
|
||||||
|
|
||||||
this.animationQueue.thenFinish(chain, deferred);
|
this.animationQueue.thenFinish(chain, deferred);
|
||||||
};
|
};
|
||||||
|
@ -1373,11 +1389,7 @@ GitEngine.prototype.rebaseStarter = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.twoArgsImpliedHead(this.generalArgs);
|
this.twoArgsImpliedHead(this.generalArgs);
|
||||||
this.rebaseFinisher(this.generalArgs[0], this.generalArgs[1]);
|
this.rebase(this.generalArgs[0], this.generalArgs[1]);
|
||||||
};
|
|
||||||
|
|
||||||
GitEngine.prototype.rebaseFinisher = function(targetSource, currentLocation) {
|
|
||||||
this.rebase(targetSource, currentLocation);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue