mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-25 15:38:33 +02:00
parent
55f54a8aa2
commit
68a58102cb
3 changed files with 22 additions and 2 deletions
|
@ -2005,7 +2005,8 @@ GitEngine.prototype.mergeCheck = function(targetSource, currentLocation) {
|
|||
return this.isUpstreamOf(targetSource, currentLocation) || sameCommit;
|
||||
};
|
||||
|
||||
GitEngine.prototype.merge = function(targetSource) {
|
||||
GitEngine.prototype.merge = function(targetSource, options) {
|
||||
options = options || {};
|
||||
var currentLocation = 'HEAD';
|
||||
|
||||
// first some conditions
|
||||
|
@ -2016,6 +2017,11 @@ GitEngine.prototype.merge = function(targetSource) {
|
|||
}
|
||||
|
||||
if (this.isUpstreamOf(currentLocation, targetSource)) {
|
||||
if (options.noFF) {
|
||||
throw new GitError({
|
||||
msg: intl.todo('Merge aborted because no-fast-forward was specified!')
|
||||
});
|
||||
}
|
||||
// just set the target of this current location to the source
|
||||
this.setTargetLocation(currentLocation, this.getCommitFromRef(targetSource));
|
||||
// get fresh animation to happen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue