mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
cehcking out what we rebased
This commit is contained in:
parent
73cf66b35e
commit
7e04853a77
1 changed files with 7 additions and 8 deletions
15
src/git.js
15
src/git.js
|
@ -735,13 +735,13 @@ GitEngine.prototype.rebaseStarter = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
||||||
|
// git for some reason always checks out the branch you are rebasing if
|
||||||
|
// you aren't in detached head
|
||||||
|
if (!this.getDetachedHead()) {
|
||||||
|
this.checkout(currentLocation);
|
||||||
|
}
|
||||||
|
|
||||||
var targetObj = this.resolveID(targetSource);
|
var targetObj = this.resolveID(targetSource);
|
||||||
/*
|
|
||||||
if (targetObj.get('type') !== 'branch') {
|
|
||||||
throw new GitError({
|
|
||||||
msg: 'Only rebase onto branches! Not individual commits'
|
|
||||||
});
|
|
||||||
}*/
|
|
||||||
|
|
||||||
// first some conditions
|
// first some conditions
|
||||||
if (this.isUpstreamOf(targetSource, currentLocation)) {
|
if (this.isUpstreamOf(targetSource, currentLocation)) {
|
||||||
|
@ -851,9 +851,8 @@ GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
||||||
beforeSnapshot = afterSnapshot;
|
beforeSnapshot = afterSnapshot;
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
// now we just need to update where we are
|
// now we just need to update the rebased branch is
|
||||||
this.setLocationTarget(currentLocation, base);
|
this.setLocationTarget(currentLocation, base);
|
||||||
|
|
||||||
// for animation
|
// for animation
|
||||||
return animationResponse;
|
return animationResponse;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue