commands.js: add --force alias to the -f option

modeled after the current implementation of branch -d / branch -D
This commit is contained in:
Waldir Pimenta 2018-07-07 18:23:47 +01:00 committed by GitHub
parent 745c10c85a
commit faf939d210
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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