mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
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:
parent
67c28028fe
commit
4471fc9595
1 changed files with 6 additions and 2 deletions
|
@ -559,7 +559,8 @@ var commandConfig = {
|
||||||
merge: {
|
merge: {
|
||||||
regex: /^git +merge($|\s)/,
|
regex: /^git +merge($|\s)/,
|
||||||
options: [
|
options: [
|
||||||
'--no-ff'
|
'--no-ff',
|
||||||
|
'--squash'
|
||||||
],
|
],
|
||||||
execute: function(engine, command) {
|
execute: function(engine, command) {
|
||||||
var commandOptions = command.getOptionsMap();
|
var commandOptions = command.getOptionsMap();
|
||||||
|
@ -568,7 +569,10 @@ var commandConfig = {
|
||||||
|
|
||||||
var newCommit = engine.merge(
|
var newCommit = engine.merge(
|
||||||
generalArgs[0],
|
generalArgs[0],
|
||||||
{ noFF: !!commandOptions['--no-ff'] }
|
{
|
||||||
|
noFF: !!commandOptions['--no-ff'],
|
||||||
|
squash: !!commandOptions['--squash']
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (newCommit === undefined) {
|
if (newCommit === undefined) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue