mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +02:00
better merge birth animation
This commit is contained in:
parent
385e3be236
commit
fcee1fa321
2 changed files with 5 additions and 20 deletions
23
src/git.js
23
src/git.js
|
@ -1026,23 +1026,9 @@ GitEngine.prototype.rebaseFinish = function(toRebaseRough, stopSet, targetSource
|
||||||
GitEngine.prototype.mergeStarter = function() {
|
GitEngine.prototype.mergeStarter = function() {
|
||||||
this.twoArgsImpliedHead(this.generalArgs);
|
this.twoArgsImpliedHead(this.generalArgs);
|
||||||
|
|
||||||
/*
|
var newCommit = this.merge(this.generalArgs[0], this.generalArgs[1]);
|
||||||
if (_.include(this.generalArgs, 'HEAD') && this.getDetachedHead()) {
|
|
||||||
throw new GitError({
|
|
||||||
msg: 'Cant merge things referencing HEAD when you are in detached head!'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// also can't merge commits directly, even though it makes sense
|
animationFactory.genCommitBirthAnimation(this.animationQueue, newCommit);
|
||||||
_.each(this.generalArgs, function(ref) {
|
|
||||||
if (this.resolveID(ref).get('type') == 'commit') {
|
|
||||||
throw new GitError({
|
|
||||||
msg: "Can't merge a commit!"
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, this);*/
|
|
||||||
|
|
||||||
this.merge(this.generalArgs[0], this.generalArgs[1]);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.merge = function(targetSource, currentLocation) {
|
GitEngine.prototype.merge = function(targetSource, currentLocation) {
|
||||||
|
@ -1072,7 +1058,7 @@ GitEngine.prototype.merge = function(targetSource, currentLocation) {
|
||||||
|
|
||||||
// since we specify parent 1 as the first parent, it is the "main" parent
|
// since we specify parent 1 as the first parent, it is the "main" parent
|
||||||
// and the node will be displayed below that branch / commit / whatever
|
// and the node will be displayed below that branch / commit / whatever
|
||||||
var commit = this.makeCommit(
|
var mergeCommit = this.makeCommit(
|
||||||
[parent1, parent2],
|
[parent1, parent2],
|
||||||
null,
|
null,
|
||||||
{
|
{
|
||||||
|
@ -1080,7 +1066,8 @@ GitEngine.prototype.merge = function(targetSource, currentLocation) {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
this.setTargetLocation(currentLocation, commit)
|
this.setTargetLocation(currentLocation, mergeCommit)
|
||||||
|
return mergeCommit;
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.checkoutStarter = function() {
|
GitEngine.prototype.checkoutStarter = function() {
|
||||||
|
|
2
todo.txt
2
todo.txt
|
@ -5,13 +5,11 @@ Big things:
|
||||||
Big Graphic things:
|
Big Graphic things:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
- gitVisuals OVERHAUL. Will make the load / save tree easier
|
- gitVisuals OVERHAUL. Will make the load / save tree easier
|
||||||
- tree layout improvements for merge commits
|
|
||||||
|
|
||||||
Medium things:
|
Medium things:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
- gitEngine loads from tree immediately, not the weird thing we have now!
|
- gitEngine loads from tree immediately, not the weird thing we have now!
|
||||||
- tree load both gitEngine and gitVisuals
|
- tree load both gitEngine and gitVisuals
|
||||||
- better merge birth animation
|
|
||||||
|
|
||||||
Small things to implement:
|
Small things to implement:
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue