Skip to content

Commit 4ed70f2

Browse files
committed
Merge pull request #38 from qvacua/master
allow git merge --no-ff BRANCH_NAME
2 parents 7762dd4 + 246fc16 commit 4ed70f2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

js/controlbox.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,17 +294,20 @@ define(['d3'], function () {
294294

295295
merge: function (args) {
296296
var noFF = false;
297+
var branch = args[0];
297298
if (args.length === 2)
298299
{
299-
var mergeSwitch = args.pop();
300-
if (mergeSwitch === '--no-ff') {
300+
if (args[0] === '--no-ff') {
301301
noFF = true;
302+
branch = args[1];
303+
} else if (args[1] === '--no-ff') {
304+
noFF = true;
305+
branch = args[0];
302306
} else {
303307
this.info('This demo only supports the --no-ff switch..');
304308
}
305309
}
306-
var ref = args.shift(),
307-
result = this.historyView.merge(ref, noFF);
310+
var result = this.historyView.merge(branch, noFF);
308311

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

0 commit comments

Comments
 (0)