mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
remove some indenting from #1104
This commit is contained in:
parent
6e88757bc4
commit
2da4d88737
1 changed files with 21 additions and 26 deletions
|
@ -765,7 +765,7 @@ var commandConfig = {
|
|||
// git push is pretty complex in terms of
|
||||
// the arguments it wants as well... get ready!
|
||||
var generalArgs = command.getGeneralArgs();
|
||||
|
||||
|
||||
// put the commandOption of delete back in the generalArgs
|
||||
// as it is a flag option
|
||||
if(isDelete) {
|
||||
|
@ -932,34 +932,29 @@ var commandConfig = {
|
|||
var generalArgs = command.getGeneralArgs();
|
||||
var commandOptions = command.getOptionsMap();
|
||||
|
||||
{
|
||||
let createOption = commandOptions['-c'] ? commandOptions['-c'] : commandOptions['--create'];
|
||||
if (createOption) {
|
||||
// the user is really trying to just make a
|
||||
// branch and then switch to it. so first:
|
||||
let args = createOption.concat(generalArgs)
|
||||
command.twoArgsImpliedHead(args, '-c');
|
||||
let createOption = commandOptions['-c'] ? commandOptions['-c'] : commandOptions['--create'];
|
||||
if (createOption) {
|
||||
// the user is really trying to just make a
|
||||
// branch and then switch to it. so first:
|
||||
let args = createOption.concat(generalArgs)
|
||||
command.twoArgsImpliedHead(args, '-c');
|
||||
|
||||
let validId = engine.validateBranchName(args[0]);
|
||||
engine.branch(validId, args[1]);
|
||||
engine.checkout(validId);
|
||||
return;
|
||||
}
|
||||
let validId = engine.validateBranchName(args[0]);
|
||||
engine.branch(validId, args[1]);
|
||||
engine.checkout(validId);
|
||||
return;
|
||||
}
|
||||
let sfc = '-C';
|
||||
let lfc = '--force-create';
|
||||
let fcOption = commandOptions[sfc] ? commandOptions[sfc] : commandOptions[lfc];
|
||||
if (fcOption) {
|
||||
let args = fcOption.concat(generalArgs);
|
||||
command.twoArgsImpliedHead(args, sfc);
|
||||
|
||||
{
|
||||
let sfc = '-C';
|
||||
let lfc = '--force-create';
|
||||
let fcOption = commandOptions[sfc] ? commandOptions[sfc] : commandOptions[lfc];
|
||||
if (fcOption) {
|
||||
let args = fcOption.concat(generalArgs);
|
||||
command.twoArgsImpliedHead(args, sfc);
|
||||
|
||||
let validId = engine.validateBranchName(args[0]);
|
||||
engine.forceBranch(validId, args[1]);
|
||||
engine.checkout(validId);
|
||||
return;
|
||||
}
|
||||
let validId = engine.validateBranchName(args[0]);
|
||||
engine.forceBranch(validId, args[1]);
|
||||
engine.checkout(validId);
|
||||
return;
|
||||
}
|
||||
|
||||
if (commandOptions['-']) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue