File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff 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.' ) ;
You can’t perform that action at this time.
0 commit comments