Update commands.js

Being a popular option in Github to squash and merge, it would be interesting to add support for this option
This commit is contained in:
Cesar Costas 2022-11-29 23:01:57 +00:00 committed by GitHub
parent 67c28028fe
commit 4471fc9595
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {