diff --git a/src/js/git/index.js b/src/js/git/index.js index 8749c720..2177bf26 100644 --- a/src/js/git/index.js +++ b/src/js/git/index.js @@ -1158,9 +1158,9 @@ GitEngine.prototype.rebaseFinish = function(toRebaseRough, stopSet, targetSource }; GitEngine.prototype.mergeStarter = function() { - this.twoArgsImpliedHead(this.generalArgs); + this.validateArgBounds(this.generalArgs, 1, 1); - var newCommit = this.merge(this.generalArgs[0], this.generalArgs[1]); + var newCommit = this.merge(this.generalArgs[0]); if (newCommit === undefined) { // its just a fast forwrard @@ -1171,7 +1171,9 @@ GitEngine.prototype.mergeStarter = function() { this.animationFactory.genCommitBirthAnimation(this.animationQueue, newCommit, this.gitVisuals); }; -GitEngine.prototype.merge = function(targetSource, currentLocation) { +GitEngine.prototype.merge = function(targetSource) { + var currentLocation = 'HEAD'; + // first some conditions if (this.isUpstreamOf(targetSource, currentLocation) || this.getCommitFromRef(targetSource) === this.getCommitFromRef(currentLocation)) { diff --git a/src/levels/intro/3.js b/src/levels/intro/3.js index 54dde492..705f9bd3 100644 --- a/src/levels/intro/3.js +++ b/src/levels/intro/3.js @@ -37,7 +37,7 @@ exports.level = { "", "So here we see that the `master` branch color is blended into all the commits, but the `bugFix` color is not. Let's fix that..." ], - "command": "git merge bugFix master", + "command": "git merge bugFix", "beforeCommand": "git checkout -b bugFix; git commit; git checkout master; git commit" } }, @@ -52,8 +52,8 @@ exports.level = { "", "Now all the commits are the same color, which means each branch contains all the work in the repository! Woohoo" ], - "command": "git merge master bugFix", - "beforeCommand": "git checkout -b bugFix; git commit; git checkout master; git commit; git merge bugFix master" + "command": "git checkout bugFix; git merge master", + "beforeCommand": "git checkout -b bugFix; git commit; git checkout master; git commit; git merge bugFix" } }, {