Skip to content

Commit

Permalink
fix(switch), rename --merge to --auto-merge-resolve to be aligned wit…
Browse files Browse the repository at this point in the history
…h other commands (#8782)

This is also needed because in case of a conflict it throws an error
with the following message:

> please use “--auto-merge-resolve” with ‘manual’, ‘ours’ or ‘theirs’ to
resolve the conflict/s

which was correct for many commands such as `bit checkout`, `bit lane
merge`, but not for `bit switch`.
  • Loading branch information
davidfirst authored Apr 15, 2024
1 parent 26c779f commit d574c3d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scopes/lanes/lanes/switch.cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ export class SwitchCmd implements Command {
"relevant when the specified lane is a remote lane. create a local alias for the lane (doesnt affect the lane's name on the remote",
],
[
'm',
'merge [strategy]',
'',
'auto-merge-resolve <merge-strategy>',
'merge local changes with the checked out version. strategy should be "theirs", "ours" or "manual"',
],
['a', 'get-all', 'DEPRECATED. this is currently the default behavior'],
['a', 'workspace-only', 'checkout only the components in the workspace to the selected lane'],
['', 'workspace-only', 'checkout only the components in the workspace to the selected lane'],
['x', 'skip-dependency-installation', 'do not install dependencies of the imported components'],
[
'p',
Expand All @@ -48,15 +48,15 @@ ${COMPONENT_PATTERN_HELP}`,
[lane]: [string],
{
alias,
merge,
autoMergeResolve,
getAll = false,
workspaceOnly = false,
skipDependencyInstallation = false,
pattern,
json = false,
}: {
alias?: string;
merge?: MergeStrategy;
autoMergeResolve?: MergeStrategy;
getAll?: boolean;
workspaceOnly?: boolean;
skipDependencyInstallation?: boolean;
Expand All @@ -67,7 +67,7 @@ ${COMPONENT_PATTERN_HELP}`,
) {
const { components, failedComponents, installationError, compilationError } = await this.lanes.switchLanes(lane, {
alias,
merge,
merge: autoMergeResolve,
workspaceOnly,
pattern,
skipDependencyInstallation,
Expand Down

0 comments on commit d574c3d

Please sign in to comment.