From 4471fc959548e798b4be30d3656a4b7733fa2b3a Mon Sep 17 00:00:00 2001 From: Cesar Costas Date: Tue, 29 Nov 2022 23:01:57 +0000 Subject: [PATCH] Update commands.js Being a popular option in Github to squash and merge, it would be interesting to add support for this option --- src/js/git/commands.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/js/git/commands.js b/src/js/git/commands.js index 50406209..c22225a7 100644 --- a/src/js/git/commands.js +++ b/src/js/git/commands.js @@ -559,7 +559,8 @@ var commandConfig = { merge: { regex: /^git +merge($|\s)/, options: [ - '--no-ff' + '--no-ff', + '--squash' ], execute: function(engine, command) { var commandOptions = command.getOptionsMap(); @@ -568,7 +569,10 @@ var commandConfig = { var newCommit = engine.merge( generalArgs[0], - { noFF: !!commandOptions['--no-ff'] } + { + noFF: !!commandOptions['--no-ff'], + squash: !!commandOptions['--squash'] + } ); if (newCommit === undefined) {