mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +02:00
bug fix for rebasing
This commit is contained in:
parent
51a92227c3
commit
e88539bd08
1 changed files with 7 additions and 0 deletions
|
@ -727,6 +727,13 @@ GitEngine.prototype.rebaseStarter = function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
||||||
|
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)) {
|
||||||
throw new CommandResult({
|
throw new CommandResult({
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue