mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 07:58:34 +02:00
have cherry pick but forgot highlight
This commit is contained in:
parent
733ad7d648
commit
f400ac238e
2 changed files with 48 additions and 69 deletions
|
@ -7753,33 +7753,26 @@ GitEngine.prototype.cherrypickStarter = function() {
|
||||||
}, this);
|
}, this);
|
||||||
// error checks are all good, lets go!
|
// error checks are all good, lets go!
|
||||||
|
|
||||||
// hack up the rebase response to animate this better
|
var destinationBranch = this.resolveID('HEAD');
|
||||||
var animationResponse = {};
|
var deferred = Q.defer();
|
||||||
animationResponse.destinationBranch = this.resolveID('HEAD');
|
var chain = deferred.promise;
|
||||||
animationResponse.toRebaseArray = [];
|
|
||||||
animationResponse.rebaseSteps = [];
|
|
||||||
|
|
||||||
// now lets start going through
|
var chainStep = _.bind(function(arg) {
|
||||||
var beforeSnapshot = this.gitVisuals.genSnapshot();
|
|
||||||
var afterSnapshot;
|
|
||||||
var newCommit;
|
|
||||||
_.each(this.generalArgs, function(arg) {
|
|
||||||
var oldCommit = this.getCommitFromRef(arg);
|
var oldCommit = this.getCommitFromRef(arg);
|
||||||
animationResponse.toRebaseArray.push(oldCommit);
|
var newCommit = this.cherrypick(arg);
|
||||||
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit = this.cherrypick(arg);
|
newCommit,
|
||||||
|
this.gitVisuals
|
||||||
afterSnapshot = this.gitVisuals.genSnapshot();
|
);
|
||||||
animationResponse.rebaseSteps.push({
|
|
||||||
oldCommit: oldCommit,
|
|
||||||
newCommit: newCommit,
|
|
||||||
beforeSnapshot: beforeSnapshot,
|
|
||||||
afterSnapshot: this.gitVisuals.genSnapshot()
|
|
||||||
});
|
|
||||||
beforeSnapshot = afterSnapshot;
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.animationFactory.rebaseAnimation(this.animationQueue, animationResponse, this, this.gitVisuals);
|
_.each(this.generalArgs, function(arg) {
|
||||||
|
chain = chain.then(function() {
|
||||||
|
return chainStep(arg);
|
||||||
|
});
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
this.animationQueue.thenFinish(chain, deferred);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
|
@ -23697,33 +23690,26 @@ GitEngine.prototype.cherrypickStarter = function() {
|
||||||
}, this);
|
}, this);
|
||||||
// error checks are all good, lets go!
|
// error checks are all good, lets go!
|
||||||
|
|
||||||
// hack up the rebase response to animate this better
|
var destinationBranch = this.resolveID('HEAD');
|
||||||
var animationResponse = {};
|
var deferred = Q.defer();
|
||||||
animationResponse.destinationBranch = this.resolveID('HEAD');
|
var chain = deferred.promise;
|
||||||
animationResponse.toRebaseArray = [];
|
|
||||||
animationResponse.rebaseSteps = [];
|
|
||||||
|
|
||||||
// now lets start going through
|
var chainStep = _.bind(function(arg) {
|
||||||
var beforeSnapshot = this.gitVisuals.genSnapshot();
|
|
||||||
var afterSnapshot;
|
|
||||||
var newCommit;
|
|
||||||
_.each(this.generalArgs, function(arg) {
|
|
||||||
var oldCommit = this.getCommitFromRef(arg);
|
var oldCommit = this.getCommitFromRef(arg);
|
||||||
animationResponse.toRebaseArray.push(oldCommit);
|
var newCommit = this.cherrypick(arg);
|
||||||
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit = this.cherrypick(arg);
|
newCommit,
|
||||||
|
this.gitVisuals
|
||||||
afterSnapshot = this.gitVisuals.genSnapshot();
|
);
|
||||||
animationResponse.rebaseSteps.push({
|
|
||||||
oldCommit: oldCommit,
|
|
||||||
newCommit: newCommit,
|
|
||||||
beforeSnapshot: beforeSnapshot,
|
|
||||||
afterSnapshot: this.gitVisuals.genSnapshot()
|
|
||||||
});
|
|
||||||
beforeSnapshot = afterSnapshot;
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.animationFactory.rebaseAnimation(this.animationQueue, animationResponse, this, this.gitVisuals);
|
_.each(this.generalArgs, function(arg) {
|
||||||
|
chain = chain.then(function() {
|
||||||
|
return chainStep(arg);
|
||||||
|
});
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
this.animationQueue.thenFinish(chain, deferred);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
|
|
|
@ -700,33 +700,26 @@ GitEngine.prototype.cherrypickStarter = function() {
|
||||||
}, this);
|
}, this);
|
||||||
// error checks are all good, lets go!
|
// error checks are all good, lets go!
|
||||||
|
|
||||||
// hack up the rebase response to animate this better
|
var destinationBranch = this.resolveID('HEAD');
|
||||||
var animationResponse = {};
|
var deferred = Q.defer();
|
||||||
animationResponse.destinationBranch = this.resolveID('HEAD');
|
var chain = deferred.promise;
|
||||||
animationResponse.toRebaseArray = [];
|
|
||||||
animationResponse.rebaseSteps = [];
|
|
||||||
|
|
||||||
// now lets start going through
|
var chainStep = _.bind(function(arg) {
|
||||||
var beforeSnapshot = this.gitVisuals.genSnapshot();
|
|
||||||
var afterSnapshot;
|
|
||||||
var newCommit;
|
|
||||||
_.each(this.generalArgs, function(arg) {
|
|
||||||
var oldCommit = this.getCommitFromRef(arg);
|
var oldCommit = this.getCommitFromRef(arg);
|
||||||
animationResponse.toRebaseArray.push(oldCommit);
|
var newCommit = this.cherrypick(arg);
|
||||||
|
return this.animationFactory.playCommitBirthPromiseAnimation(
|
||||||
newCommit = this.cherrypick(arg);
|
newCommit,
|
||||||
|
this.gitVisuals
|
||||||
afterSnapshot = this.gitVisuals.genSnapshot();
|
);
|
||||||
animationResponse.rebaseSteps.push({
|
|
||||||
oldCommit: oldCommit,
|
|
||||||
newCommit: newCommit,
|
|
||||||
beforeSnapshot: beforeSnapshot,
|
|
||||||
afterSnapshot: this.gitVisuals.genSnapshot()
|
|
||||||
});
|
|
||||||
beforeSnapshot = afterSnapshot;
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
this.animationFactory.rebaseAnimation(this.animationQueue, animationResponse, this, this.gitVisuals);
|
_.each(this.generalArgs, function(arg) {
|
||||||
|
chain = chain.then(function() {
|
||||||
|
return chainStep(arg);
|
||||||
|
});
|
||||||
|
}, this);
|
||||||
|
|
||||||
|
this.animationQueue.thenFinish(chain, deferred);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue