mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-26 16:08:34 +02:00
more bugs squashed
This commit is contained in:
parent
e844b5b25f
commit
ddaf71fc34
3 changed files with 35 additions and 7 deletions
|
@ -977,7 +977,6 @@ GitEngine.prototype.rebase = function(targetSource, currentLocation) {
|
|||
// keep searching
|
||||
pQueue = pQueue.concat(popped.get('parents'));
|
||||
}
|
||||
console.log('this is what our rebase rough array is', toRebaseRough);
|
||||
|
||||
return this.rebaseFinish(toRebaseRough, stopSet, targetSource, currentLocation);
|
||||
};
|
||||
|
@ -1092,6 +1091,17 @@ GitEngine.prototype.rebaseFinish = function(toRebaseRough, stopSet, targetSource
|
|||
}
|
||||
}, this);
|
||||
|
||||
toRebaseRough = toRebase;
|
||||
toRebase = [];
|
||||
// finally, make the set unique
|
||||
var uniqueIDs = {};
|
||||
_.each(toRebaseRough, function(commit) {
|
||||
if (uniqueIDs[commit.get('id')]) { return; }
|
||||
|
||||
uniqueIDs[commit.get('id')] = true;
|
||||
toRebase.push(commit);
|
||||
}, this);
|
||||
|
||||
if (!toRebase.length) {
|
||||
throw new GitError({
|
||||
msg: 'No Commits to Rebase! Everything else is merge commits or changes already have been applied'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue