From faf939d2102659c12de5596cc95f536568be4567 Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Sat, 7 Jul 2018 18:23:47 +0100 Subject: [PATCH] commands.js: add --force alias to the -f option modeled after the current implementation of branch -d / branch -D --- src/js/git/commands.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/js/git/commands.js b/src/js/git/commands.js index c6940585..7ba2c855 100644 --- a/src/js/git/commands.js +++ b/src/js/git/commands.js @@ -413,6 +413,7 @@ var commandConfig = { '-d', '-D', '-f', + '--force', '-a', '-r', '-u', @@ -458,8 +459,9 @@ var commandConfig = { return; } - if (commandOptions['-f']) { - args = commandOptions['-f'].concat(generalArgs); + if (commandOptions['-f'] || commandOptions['--force']) { + args = commandOptions['-f'] || commandOptions['--force']; + args = args.concat(generalArgs); command.twoArgsImpliedHead(args, '-f'); // we want to force a branch somewhere