Skip to content

Commit

Permalink
fix --no-ff merge
Browse files Browse the repository at this point in the history
  • Loading branch information
qvacua committed Sep 11, 2015
1 parent 7762dd4 commit 246fc16
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions js/controlbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,17 +294,20 @@ define(['d3'], function () {

merge: function (args) {
var noFF = false;
var branch = args[0];
if (args.length === 2)
{
var mergeSwitch = args.pop();
if (mergeSwitch === '--no-ff') {
if (args[0] === '--no-ff') {
noFF = true;
branch = args[1];
} else if (args[1] === '--no-ff') {
noFF = true;
branch = args[0];
} else {
this.info('This demo only supports the --no-ff switch..');
}
}
var ref = args.shift(),
result = this.historyView.merge(ref, noFF);
var result = this.historyView.merge(branch, noFF);

if (result === 'Fast-Forward') {
this.info('You have performed a fast-forward merge.');
Expand Down

0 comments on commit 246fc16

Please sign in to comment.