mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 15:38:33 +02:00
No multiple arguments for merge
`git merge` should only be given multiple arguments if doing an octopus merge which isn't currently supported. Require that exactly one argument be given, and always use HEAD as the currentLocation.
This commit is contained in:
parent
df4452290b
commit
4d6d247d01
1 changed files with 5 additions and 3 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue